summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-12-01 18:10:35 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-12-02 11:44:43 +0000
commit7fc3024a16af6e96b6391b0dc19d6b5887372d05 (patch)
tree1caf3a8de77426d07f559205f59e128616376b78 /src
parent4ffa4cbdad93a31ef7d9712d3d91777510a1a17d (diff)
Work around MSVC linker out of memory failure
The native 32 bit MSVC linker tends to fail with LNK1102 (out of memory) in debug mode. Work around this issue by disabling debug information for x86, when not using the amd64_x86 cross-compiler. Task-number: QTBUG-49545 Change-Id: I2aac7e400719f74ced450e264ab1464596e5f204 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/config/windows.pri24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri
index f0c0c8f43..1e875f308 100644
--- a/src/core/config/windows.pri
+++ b/src/core/config/windows.pri
@@ -28,6 +28,25 @@ contains(QT_CONFIG, angle) {
GYP_ARGS += "-D qt_gl=\"opengl\""
}
+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 {
equals(MSVC_VER, 12.0) {
MSVS_VERSION = 2013
@@ -44,6 +63,11 @@ msvc {
# is building for, not the system's actual architecture.
PROGRAM_FILES_X86 = $$(ProgramW6432)
isEmpty(PROGRAM_FILES_X86): GYP_ARGS += "-D windows_sdk_path=\"C:/Program Files/Windows Kits/8.1\""
+
+ contains(QT_ARCH, "i386"):!usingMSVC32BitCrossCompiler() {
+ # The 32 bit MSVC linker runs out of memory if we do not remove all debug information.
+ GYP_CONFIG += fastbuild=2
+ }
} else {
fatal("Qt WebEngine for Windows can only be built with the Microsoft Visual Studio C++ compiler")
}