From d6066d53fa70e1736ca64d468605a4a430644400 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 16 Dec 2021 18:51:31 +0100 Subject: CMake: Fix detection of linker availability Previously we passed flags like -ld-fuse=lld only to compile calls, but not to the link call of a compile test project. Make sure to pass it to the link call instead by using check_cxx_source_compiles + CMAKE_REQUIRED_LINK_OPTIONS instead of check_cxx_compiler_flag. Note the flag that is passed is still via passed via the compiler launcher and not directly to the linker. Remove duplicate flag handling code. Pick-to: 6.2 6.3 Change-Id: I1bf90573904a9df83240b6debfee3cc9e425c6bb Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- configure.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.cmake') diff --git a/configure.cmake b/configure.cmake index 1d24d1d278..6cb93ad918 100644 --- a/configure.cmake +++ b/configure.cmake @@ -24,17 +24,17 @@ qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global Q #### Early-evaluated, Linker-related Tests and Features -qt_config_compiler_supports_flag_test(use_bfd_linker +qt_internal_check_if_linker_is_available(use_bfd_linker LABEL "bfd linker" FLAG "-fuse-ld=bfd" ) -qt_config_compiler_supports_flag_test(use_gold_linker +qt_internal_check_if_linker_is_available(use_gold_linker LABEL "gold linker" FLAG "-fuse-ld=gold" ) -qt_config_compiler_supports_flag_test(use_lld_linker +qt_internal_check_if_linker_is_available(use_lld_linker LABEL "lld linker" FLAG "-fuse-ld=lld" ) -- cgit v1.2.3