diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-24 12:44:28 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-08-08 11:18:45 +0000 |
commit | 0bc341e3dcba1f561a685d72cfa0f4b1a7f697dd (patch) | |
tree | bc79d5bc3f8bbbda56b72b0825c70bb71127d863 /share/qbs/modules/cpp/msvc.js | |
parent | 43e3b7ad7e5e68bae839feb74cdbcde48424c065 (diff) | |
download | qbs-0bc341e3dcba1f561a685d72cfa0f4b1a7f697dd.tar.gz |
Add support for job pools
Commands can now be assigned to an arbitrary job pool and a limit for
the number of concurrently running jobs in such pools can be provided in
a number of ways:
- via the build command line: qbs --job-limits linker:1
- via the settings: qbs config preferences.jobLimit.linker 1
- in a project file: JobLimit {
jobPool: "linker";
jobCount: 1
}
We provide two job pools ourselves with the cpp module: "compiler" and
"linker".
[ChangeLog] Added the concept of job pools for limiting concurrent
execution of commands by type
Task-number: QBS-743
Change-Id: Ib3f361dbc73093e342bf0eba0daf2079a2b3a8ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/msvc.js')
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index d6df99dc2..196e5ae43 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -246,6 +246,7 @@ function prepareCompiler(project, product, inputs, outputs, input, output, expli if (pchOutput) cmd.description += ' (' + tag + ')'; cmd.highlight = "compiler"; + cmd.jobPool = "compiler"; cmd.workingDirectory = product.buildDirectory; cmd.responseFileUsagePrefix = '@'; // cl.exe outputs the cpp file name. We filter that out. @@ -469,6 +470,7 @@ function prepareLinker(project, product, inputs, outputs, input, output) { var cmd = new Command(linkerPath, args) cmd.description = 'linking ' + primaryOutput.fileName; cmd.highlight = 'linker'; + cmd.jobPool = "linker"; cmd.relevantEnvironmentVariables = ["LINK", "_LINK_", "LIB", "TMP"]; cmd.workingDirectory = FileInfo.path(primaryOutput.filePath) cmd.responseFileUsagePrefix = '@'; |