diff options
Diffstat (limited to 'share/qbs/modules/cpp/gcc.js')
| -rw-r--r-- | share/qbs/modules/cpp/gcc.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index 453b2b31e..6dc75a041 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -145,11 +145,11 @@ function additionalCompilerFlags(product, input, output) } var args = [] + var positionIndependentCode = product.moduleProperty('cpp', 'positionIndependentCode') if (effectiveType === EffectiveTypeEnum.LIB) { - if (!product.moduleProperty("qbs", "toolchain").contains("mingw")) + if (positionIndependentCode !== false && !product.moduleProperty("qbs", "toolchain").contains("mingw")) args.push('-fPIC'); } else if (effectiveType === EffectiveTypeEnum.APP) { - var positionIndependentCode = product.moduleProperty('cpp', 'positionIndependentCode') if (positionIndependentCode && !product.moduleProperty("qbs", "toolchain").contains("mingw")) args.push('-fPIE'); } else { @@ -249,6 +249,10 @@ function languageName(fileTag) return 'objective-c'; else if (fileTag === 'objcpp') return 'objective-c++'; + else if (fileTag === 'asm') + return 'assembler'; + else if (fileTag === 'asm_cpp') + return 'assembler-with-cpp'; } function prepareCompiler(project, product, inputs, outputs, input, output) @@ -257,8 +261,8 @@ function prepareCompiler(project, product, inputs, outputs, input, output) // Determine which C-language we're compiling var tag = ModUtils.fileTagForTargetLanguage(input.fileTags.concat(output.fileTags)); - if (!["c", "cpp", "objc", "objcpp"].contains(tag)) - throw ("unsupported source language"); + if (!["c", "cpp", "objc", "objcpp", "asm", "asm_cpp"].contains(tag)) + throw ("unsupported source language: " + tag); // Whether we're compiling a precompiled header or normal source file var pchOutput = outputs[tag + "_pch"] ? outputs[tag + "_pch"][0] : undefined; |
