summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-03 11:04:13 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-07 11:28:53 +0000
commit023478ee3838ee9c7ef00488ea2a39282a3ea4b8 (patch)
treed97ace0a4e661916646cfebcbdb376c698998a87 /src/core
parent80ef5d39381f43af2e2b1ca7d2443d687f09e413 (diff)
Use GN linker flags on core_module
Again enable linking with the flags GN calculated for us. Also fixes a typo that meant we didn't get the link timing flags on Windows. Change-Id: Idd46fd65ea7618a9c510fa2c790569f5974aa5ff Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/config/windows.pri2
-rw-r--r--src/core/core_module.pro7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri
index d5b50842e..4ca2ae6c1 100644
--- a/src/core/config/windows.pri
+++ b/src/core/config/windows.pri
@@ -10,7 +10,7 @@ gn_args += \
enable_session_service=false \
ninja_use_custom_environment_files=false \
is_multi_dll_chrome=false \
- win_link_timing=true
+ win_linker_timing=true
GYP_CONFIG += \
disable_nacl=1 \
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index d2506e343..fecee2536 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -37,9 +37,10 @@ use?(gn){
linux: LIBS_PRIVATE += -Wl,--start-group $$NINJA_ARCHIVES -Wl,--end-group
else: LIBS_PRIVATE += $$NINJA_ARCHIVES
LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS
- # We need to use ObjC runtime to have categories selectors working.
- macos: QMAKE_LFLAGS += -Wl,-ObjC
-# QMAKE_LFLAGS += $$NINJA_LFLAGS
+ # GN's LFLAGS doesn't always work across all the Linux configurations we support.
+ # The Windows and macOS ones from GN does provide a few useful flags however
+ linux: QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now -Wl,-z,defs
+ else: QMAKE_LFLAGS += $$NINJA_LFLAGS
POST_TARGETDEPS += $$NINJA_TARGETDEPS
}