aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-02-22 09:54:40 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2018-02-22 11:39:09 +0000
commit905b78882ac6c6bc14674a23f2eeb8fdea331c9b (patch)
tree694c02af4570cffb28f01ba4e3995ab176db90de
parentf4f295b5197d7a38dfba5675ff576929ec8aee48 (diff)
mingw: Use a lower response file threshold
Both compiler and linker of this toolchain can considerably lengthen the command line when forwarding it to internal helper tools. Adapt the response file threshold accordingly. Change-Id: Iac071163375f276203a83d9ec503f4a3345f6b40 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
-rw-r--r--share/qbs/modules/cpp/gcc.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index ab0f5f123..e5614127d 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -1011,6 +1011,12 @@ function linkerEnvVars(config, inputs)
return list;
}
+function setResponseFileThreshold(command, product)
+{
+ if (product.qbs.toolchain.contains("mingw") && product.qbs.hostOS.contains("windows"))
+ command.responseFileThreshold = 10000;
+}
+
function prepareCompiler(project, product, inputs, outputs, input, output, explicitlyDependsOn) {
var compilerInfo = effectiveCompilerInfo(product.qbs.toolchain,
input, output);
@@ -1036,6 +1042,7 @@ function prepareCompiler(project, product, inputs, outputs, input, output, expli
cmd.relevantEnvironmentVariables = compilerEnvVars(input, compilerInfo);
cmd.responseFileArgumentIndex = wrapperArgsLength;
cmd.responseFileUsagePrefix = '@';
+ setResponseFileThreshold(cmd, product);
return cmd;
}
@@ -1254,6 +1261,7 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
cmd.relevantEnvironmentVariables = linkerEnvVars(product, inputs);
cmd.responseFileArgumentIndex = responseFileArgumentIndex;
cmd.responseFileUsagePrefix = useQnxResponseFileHack ? "-Wl,@" : "@";
+ setResponseFileThreshold(cmd, product);
commands.push(cmd);
var debugInfo = outputs.debuginfo_app || outputs.debuginfo_dll