summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-07-28 03:48:33 -0700
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-07-28 11:27:53 +0000
commitb9bead2be7feab7db1a1d352ebe890db79703436 (patch)
tree3e67848a6802c62d24bb7eada2e984df58a24264
parent4adc9c2c5626a8adc5e97612c4ef5720ab36e0c2 (diff)
downloadqbs-b9bead2be7feab7db1a1d352ebe890db79703436.tar.gz
Standardize handling of compiler flags in GCC and MSVC.
This ensures that both toolchains handle all permutations of the class [regular, platform] and language [common, c, cpp, objc, objcpp]. Change-Id: I6e4d41ecee22fa5f2907f51e610d64ae0678937c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--share/qbs/modules/cpp/gcc.js7
-rw-r--r--share/qbs/modules/cpp/msvc.js13
2 files changed, 7 insertions, 13 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index f99e60e37..452a5b4a2 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -347,8 +347,6 @@ function prepareCompiler(project, product, inputs, outputs, input, output) {
args.push(prefixHeaders[i]);
}
- args = args.concat(ModUtils.moduleProperties(input, 'platformCommonCompilerFlags'));
-
var compilerPath;
var compilerPathByLanguage = ModUtils.moduleProperty(input, "compilerPathByLanguage");
if (compilerPathByLanguage)
@@ -363,7 +361,9 @@ function prepareCompiler(project, product, inputs, outputs, input, output) {
compilerPath = ModUtils.moduleProperty(input, "compilerPath");
}
- args = args.concat(ModUtils.moduleProperties(input, 'platformFlags', tag),
+ args = args.concat(ModUtils.moduleProperties(input, 'platformFlags'),
+ ModUtils.moduleProperties(input, 'flags'),
+ ModUtils.moduleProperties(input, 'platformFlags', tag),
ModUtils.moduleProperties(input, 'flags', tag));
if (!pchOutput && ModUtils.moduleProperty(product, 'precompiledHeader', tag)) {
@@ -373,7 +373,6 @@ function prepareCompiler(project, product, inputs, outputs, input, output) {
args.push('-include', pchFilePath);
}
- args = args.concat(ModUtils.moduleProperties(input, 'commonCompilerFlags'));
args = args.concat(additionalCompilerFlags(product, input, output));
args = args.concat(additionalCompilerAndLinkerFlags(product));
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js
index 4e6c2153e..348cd70d7 100644
--- a/share/qbs/modules/cpp/msvc.js
+++ b/share/qbs/modules/cpp/msvc.js
@@ -137,15 +137,10 @@ function prepareCompiler(project, product, inputs, outputs, input, output) {
}
}
- if (tag === "cpp") {
- args = args.concat(
- ModUtils.moduleProperties(input, 'platformCxxFlags'),
- ModUtils.moduleProperties(input, 'cxxFlags'));
- } else if (tag === "c") {
- args = args.concat(
- ModUtils.moduleProperties(input, 'platformCFlags'),
- ModUtils.moduleProperties(input, 'cFlags'));
- }
+ args = args.concat(ModUtils.moduleProperties(input, 'platformFlags'),
+ ModUtils.moduleProperties(input, 'flags'),
+ ModUtils.moduleProperties(input, 'platformFlags', tag),
+ ModUtils.moduleProperties(input, 'flags', tag));
var compilerPath = ModUtils.moduleProperty(product, "compilerPath");
var wrapperArgs = ModUtils.moduleProperty(product, "compilerWrapper");