summaryrefslogtreecommitdiffstats
path: root/src/widgets/CMakeLists.txt
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-02-17 14:58:16 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-02-25 15:47:50 +0100
commit119ffd478134d793fb4414a65549acd19e919e0b (patch)
tree91f81998f26ec91771230b7def53d2e0ce5e4011 /src/widgets/CMakeLists.txt
parentbbf46e38b1d0f70b5c830b3ae2fccf66cf7edb8d (diff)
CMake: Port the reduce-relocations feature
As reduce-relocations implies bsymbolic_functions, we also add the -Bsymbolic-functions linker flag. Also, handle the .dynlist files that are passed to the linker by bsymbolic_functions.prf in the qmake build. Change-Id: I535c33fba888596d2f8975b16864bbe9f0a7caa4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/widgets/CMakeLists.txt')
-rw-r--r--src/widgets/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index e756b27bee..b3c015f3db 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -281,10 +281,13 @@ qt_add_resource(Widgets "qstyle1"
${qstyle1_resource_files}
)
+if(QT_FEATURE_reduce_relocations AND UNIX AND GCC)
+ target_link_options(Widgets PRIVATE
+ "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtWidgets.dynlist")
+endif()
#### Keys ignored in scope 1:.:.:widgets.pro:<TRUE>:
# MODULE_CONFIG = "uic"
-# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtWidgets.dynlist"
# QMAKE_LIBS = "$$QMAKE_LIBS_GUI"
## Scopes: