summaryrefslogtreecommitdiffstats
path: root/src/core/core_module.pro
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-05-17 11:50:31 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-07 22:17:20 +0000
commit6eae98639730ab1ad1611f1ea61bcaad2fe0f69a (patch)
treebe6c5b3aa1c7e80687b8e23b6f82ad50a5cd4544 /src/core/core_module.pro
parente16f177e093b40d5146047f3f27e8442ec20be10 (diff)
Use MSVC's /WHOLEARCHIVE linker flag
The /WHOLEARCHIVE option was introduced in Visual Studio 2015 Update 2. Since we support no older MSVC version we can unconditionally use this option and remove our hack that simulates whole-archive by writing object file names into a linker reponse file. Change-Id: I32d2cb556c15f9a8aa2f77f608268e0af7ab6a1d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/core_module.pro')
-rw-r--r--src/core/core_module.pro4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 44e8ac613..3785ddc46 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -47,10 +47,8 @@ CONFIG *= no_smart_library_merge
osx {
LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a
} 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.
QMAKE_LFLAGS += /OPT:REF
- QMAKE_LFLAGS += @$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib.objects
+ QMAKE_LFLAGS += /WHOLEARCHIVE:$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib
} else {
LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive
}