aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/GenericGCC.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/cpp/GenericGCC.qbs')
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs35
1 files changed, 25 insertions, 10 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 8b08b349e..86788352c 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -56,6 +56,7 @@ CppModule {
property stringList transitiveSOs
property string toolchainPrefix
property path toolchainInstallPath
+ assemblerName: 'as'
compilerName: cxxCompilerName
linkerName: cxxCompilerName
property string archiverName: 'ar'
@@ -95,15 +96,15 @@ CppModule {
+ (qbs.toolchain.contains("clang") ? "clang++" : "g++")
+ executableSuffix
- compilerPathByLanguage: {
- return {
- "c": toolchainPathPrefix + cCompilerName,
- "cpp": toolchainPathPrefix + cxxCompilerName,
- "objc": toolchainPathPrefix + cCompilerName,
- "objcpp": toolchainPathPrefix + cxxCompilerName
- };
- }
+ compilerPathByLanguage: ({
+ "c": toolchainPathPrefix + cCompilerName,
+ "cpp": toolchainPathPrefix + cxxCompilerName,
+ "objc": toolchainPathPrefix + cCompilerName,
+ "objcpp": toolchainPathPrefix + cxxCompilerName,
+ "asm_cpp": toolchainPathPrefix + cCompilerName
+ })
+ assemblerPath: toolchainPathPrefix + assemblerName
compilerPath: toolchainPathPrefix + compilerName
linkerPath: toolchainPathPrefix + linkerName
property path archiverPath: { return toolchainPathPrefix + archiverName }
@@ -335,13 +336,13 @@ CppModule {
Rule {
id: compiler
- inputs: ["cpp", "c", "objcpp", "objc", "asm", "asm_cpp"]
+ inputs: ["cpp", "c", "objcpp", "objc", "asm_cpp"]
auxiliaryInputs: ["hpp"]
explicitlyDependsOn: ["c_pch", "cpp_pch", "objc_pch", "objcpp_pch"]
Artifact {
fileTags: ["obj"]
- filePath: ".obj/" + qbs.getHash(input.baseDir) + "/" + input.fileName + ".o"
+ filePath: FileInfo.joinPaths(".obj", qbs.getHash(input.baseDir), input.fileName + ".o")
}
prepare: {
@@ -349,6 +350,20 @@ CppModule {
}
}
+ Rule {
+ id: assembler
+ inputs: ["asm"]
+
+ Artifact {
+ fileTags: ["obj"]
+ filePath: FileInfo.joinPaths(".obj", qbs.getHash(input.baseDir), input.fileName + ".o")
+ }
+
+ prepare: {
+ return Gcc.prepareAssembler.apply(this, arguments);
+ }
+ }
+
Transformer {
condition: cPrecompiledHeader !== undefined
inputs: cPrecompiledHeader