diff options
author | Kai Koehne <kai.koehne@qt.io> | 2017-03-28 14:20:30 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2017-03-28 13:08:57 +0000 |
commit | 999f6311644e6be137a70f8fa3c7f36286aa4be0 (patch) | |
tree | ffd890b1b6d5155170be963f4cabf1b0376ee01e /src/core | |
parent | 65fa72dd9a2eab3148063db8116f623fed14ae7a (diff) |
Fix build on 32 bit msvc toolchain
Bring back the logic to disable debugging symbols for 32
bit native compilers on Windows (symbol_level = 0), or
only do minimal debugging symbols useful for e.g. stack
traces (symbol_level = 1).
The corresponding gyp logic got removed in commit c5282c347929.
Change-Id: Ibb7d43814992a00f5413d024f9c362d41dc5a3a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/config/windows.pri | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri index bc086277f..8d5a65f6f 100644 --- a/src/core/config/windows.pri +++ b/src/core/config/windows.pri @@ -19,6 +19,33 @@ isDeveloperBuild() { use_incremental_linking=false } +defineTest(usingMSVC32BitCrossCompiler) { + CL_DIR = + for(dir, QMAKE_PATH_ENV) { + exists($$dir/cl.exe) { + CL_DIR = $$dir + break() + } + } + isEmpty(CL_DIR): { + warning(Cannot determine location of cl.exe.) + return(false) + } + CL_DIR = $$system_path($$CL_DIR) + CL_DIR = $$split(CL_DIR, \\) + CL_PLATFORM = $$last(CL_DIR) + equals(CL_PLATFORM, amd64_x86): return(true) + return(false) +} + +msvc:contains(QT_ARCH, "i386"):!usingMSVC32BitCrossCompiler() { + # The 32 bit MSVC linker runs out of memory if we do not remove all debug information. + gn_args += symbol_level=0 +} else { + # Chromium builds with debug info in release by default but Qt doesn't + CONFIG(release, debug|release):!force_debug_info: gn_args += symbol_level=1 +} + msvc { equals(MSVC_VER, 14.0) { MSVS_VERSION = 2015 |