summaryrefslogtreecommitdiffstats
path: root/src/corelib/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/corelib/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/corelib/CMakeLists.txt')
-rw-r--r--src/corelib/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index 8e236ec3f5..b62ce89f4d 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -358,6 +358,10 @@ qt_add_simd_part(Core SIMD mips_dsp
text/qstring_mips_dsp_asm.S
)
+if(QT_FEATURE_reduce_relocations AND UNIX AND GCC)
+ target_link_options(Core PRIVATE
+ "LINKER:--dynamic-list=${CMAKE_CURRENT_LIST_DIR}/QtCore.dynlist")
+endif()
if(ANDROID)
set_property(TARGET Core APPEND PROPERTY QT_ANDROID_BUNDLED_JAR_DEPENDENCIES
@@ -380,7 +384,6 @@ endif()
# MODULE = "core"
# MODULE_CONFIG = "moc" "resources"
# QMAKE_DSYM_DEBUG_SCRIPT = "$$PWD/debug_script.py"
-# QMAKE_DYNAMIC_LIST_FILE = "$$PWD/QtCore.dynlist"
# QMAKE_PKGCONFIG_VARIABLES = "host_bins" "qt_conf"
# QMAKE_SUBSTITUTES = "ctest_macros_file" "cmake_umbrella_config_file" "cmake_umbrella_config_module_location" "cmake_umbrella_config_module_location_for_install" "cmake_umbrella_config_version_file" "cmake_extras_mkspec_dir" "cmake_extras_mkspec_dir_for_install"
# cmake_extras_mkspec_dir.input = "$$PWD/Qt5CoreConfigExtrasMkspecDir.cmake.in"