From: Vsevolod Stakhov Date: Sun, 16 Jul 2023 21:09:46 +0000 (+0100) Subject: [Minor] Do not use lld when clang is not the compiler... X-Git-Tag: 3.6~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2bf9fd226253e32d1d70f7ad379fcbb2ccb6d61;p=thirdparty%2Frspamd.git [Minor] Do not use lld when clang is not the compiler... --- diff --git a/cmake/Toolset.cmake b/cmake/Toolset.cmake index fc019cf35a..dfd1d30088 100644 --- a/cmake/Toolset.cmake +++ b/cmake/Toolset.cmake @@ -78,7 +78,15 @@ find_program(GOLD_PATH NAMES "ld.gold" "gold") if(NOT LINKER_NAME) if(LLD_PATH) - set(LINKER_NAME "lld") + if (COMPILER_CLANG) + set(LINKER_NAME "lld") + else() + if(GOLD_PATH) + set(LINKER_NAME "gold") + else() + message(STATUS "Use generic 'ld' as a linker") + endif() + endif() elseif(GOLD_PATH) set(LINKER_NAME "gold") else()