summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-08-20 09:06:16 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-08-20 17:07:49 +0200
commit2f1a55c0b13ea02619f0d209a2b710fb7cbe8a1a (patch)
tree4659347755d9b009980e3847d1cfb92f3a9bc9ab /cmake
parentdf28355981e14c90dc0f214ceeba40be77401fb4 (diff)
CMake: Implement configure -linker [bfd,gold,lld]
Fixes: QTBUG-86155 Change-Id: I5ba2d3b52d9ca240b48904c492f7902a056c0292 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtInternalTargets.cmake8
-rw-r--r--cmake/configure-cmake-mapping.md3
2 files changed, 10 insertions, 1 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index bd3d034f60..e59e075d32 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -213,6 +213,14 @@ if(DEFINED QT_EXTRA_FRAMEWORKPATHS AND APPLE)
unset(__qt_fw_flags)
endif()
+if(QT_FEATURE_use_gold_linker)
+ target_link_options(PlatformCommonInternal INTERFACE "-fuse-ld=gold")
+elseif(QT_FEATURE_use_bfd_linker)
+ target_link_options(PlatformCommonInternal INTERFACE "-fuse-ld=bfd")
+elseif(QT_FEATURE_use_lld_linker)
+ target_link_options(PlatformCommonInternal INTERFACE "-fuse-ld=lld")
+endif()
+
function(qt_get_implicit_sse2_genex_condition out_var)
set(is_shared_lib "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>")
set(is_static_lib "$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_LIBRARY>")
diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md
index e0edfe98e7..cafe139ce8 100644
--- a/cmake/configure-cmake-mapping.md
+++ b/cmake/configure-cmake-mapping.md
@@ -66,7 +66,8 @@ The effort of this is tracked in QTBUG-85373 and QTBUG-85349.
| -static-runtime | -DFEATURE_static_runtime=ON | |
| -pch | -DBUILD_WITH_PCH=ON | |
| -ltcg | | |
-| -linker [bfd,gold,lld] | | |
+| -linker [bfd,gold,lld] | -DINPUT_linker=<name> or | |
+| | -DFEATURE_use_<name>_linker=ON | |
| -incredibuild-xge | | |
| -ccache | -DQT_USE_CCACHE=ON | |
| -make-tool <tool> | n/a | |