summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-06-04 12:48:10 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-06-04 10:50:29 +0000
commitdf84dec6bc90c087aab4a2b9b4bfe6f129584ebb (patch)
tree45a0bdbe4dfba6f859672d34d6dbd4c33db6a0ab
parentaf1c0087e51b6e2ad905259bb7a1d50101735d2d (diff)
Use Chromium linker flags
Add all Chromium linker flags by default and explicitly blacklist some of them. Change-Id: Icb461838f71c8511fe5730d4601eb20bc2aa135c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/core/core_module.pro14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 9bd56f9de..7bcd916a1 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -42,11 +42,15 @@ LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS
unix:qtConfig(webengine-noexecstack): \
QMAKE_LFLAGS += -Wl,-z,noexecstack
linux {
- QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now
- # Embedded address sanitizer symbols are undefined and are picked up by the dynamic link loader
- # at runtime. Thus we do not to pass the linker flag below, because the linker would complain
- # about the undefined sanitizer symbols.
- !sanitizer: QMAKE_LFLAGS += -Wl,-z,defs
+ # add chromium flags
+ for(flag, NINJA_LFLAGS) {
+ # filter out some flags
+ !contains(flag, .*noexecstack$): \
+ !contains(flag, .*as-needed$): \
+ !contains(flag, ^-B.*): \
+ !contains(flag, ^-fuse-ld.*): \
+ QMAKE_LFLAGS += $$flag
+ }
} else {
QMAKE_LFLAGS += $$NINJA_LFLAGS
}