diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Toolset.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/Toolset.cmake b/cmake/Toolset.cmake index fc019cf35..dfd1d3008 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() |