Skip to content

Commit

Permalink
[Minor] Do not use lld when clang is not the compiler...
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Jul 16, 2023
1 parent 1099b4e commit d2bf9fd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmake/Toolset.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d2bf9fd

Please sign in to comment.