summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/api/core_api.pro8
-rw-r--r--src/core/core_module.pro4
2 files changed, 1 insertions, 11 deletions
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
index 22c165e2a..d3d47e03a 100644
--- a/src/core/api/core_api.pro
+++ b/src/core/api/core_api.pro
@@ -53,11 +53,3 @@ SOURCES = \
unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
SOURCES += qtbug-60565.cpp
}
-
-msvc {
- # Create a list of object files that can be used as response file for the linker.
- # This is done to simulate -whole-archive on MSVC.
- QMAKE_POST_LINK = \
- "if exist $(DESTDIR_TARGET).objects del $(DESTDIR_TARGET).objects$$escape_expand(\\n\\t)" \
- "for %%a in ($(OBJECTS)) do echo $$shell_quote($$shell_path($$OUT_PWD))\\%%a >> $(DESTDIR_TARGET).objects"
-}
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
}