diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-11-18 16:16:20 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-11-20 09:43:33 +0000 |
commit | 6f8feb9cccbf130339cf118a61512feb8a0424c8 (patch) | |
tree | 5d306ae71a1d02b5bd748348447329d90a41fc05 /share/qbs/modules | |
parent | de04ecbbf59b361320a174ee0117c2cfa8c10012 (diff) |
Fix building 32-bit x86 binaries with clang-cl
Fixes: QBS-1509
Change-Id: I8ff042bf2006fb989c05490b6a7a3f61aa896920
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'share/qbs/modules')
-rw-r--r-- | share/qbs/modules/cpp/msvc.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index b67ab811f..5ede90840 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -135,6 +135,13 @@ function prepareCompiler(project, product, inputs, outputs, input, output, expli break; } + if (input.qbs.toolchain.contains("clang-cl")) { + if (input.cpp.architecture === "x86") + args.push("-m32"); + else if (input.cpp.architecture === "x86_64") + args.push("-m64"); + } + if (debugInformation) { if (product.cpp.separateDebugInformation) args.push('/Zi'); |