diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-09-15 10:54:45 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-09-24 08:44:42 +0000 |
commit | 0c6147d9b5ffbe18bfe1e8deb9cc128c9a0fad27 (patch) | |
tree | fed576ea2494760069ebd18cabd2c01f54aa3b31 /src/core/core_module.pro | |
parent | 6e3485d32698626534acd76ba322d58878dd8b79 (diff) |
fix debug_and_release build on Windows
The public API symbols are compiled in a static library that's linked to core
with --whole-archive when using gcc. There's no equivalent for this in MSVC.
We hacked around this limitation in commit 38944be4 by creating a source file
that includes every public header.
Unfortunately this breaks debug_and_release builds, because we must inject this
generated source file as absolute path, and gyp will generate the same object
file for every source file that's specified with an absolute path...
This reverts commit 38944be4 and replaces the work-around by simulating
-whole-archive on MSVC. This is done by passing all object files that belong
to qtwebenginecoreapi.lib to the linker via a response file that is created
when building qtwebenginecoreapi.lib.
Task-number: QTBUG-48376
Change-Id: Iaa991fe96a2c336d982d29d6924ce950c0be5398
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/core/core_module.pro')
-rw-r--r-- | src/core/core_module.pro | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 219df8e34..cf253a735 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -19,8 +19,11 @@ LIBS_PRIVATE += -L$$api_library_path CONFIG *= no_smart_library_merge osx { LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a -} else:win32-msvc* { - LIBS_PRIVATE += /OPT:REF -l$$api_library_name +} else:msvc { + # Simulate -whole-archive by passing the list of object files that belong to the public + # API library as response file to the linker. + LIBS_PRIVATE += /OPT:REF + QMAKE_LFLAGS += @$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib.objects } else { LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive } |