Skip to content

Commit

Permalink
Restrict using mold linker to clang.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfpld committed May 12, 2024
1 parent 1a971d8 commit 813f424
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ if(EMSCRIPTEN)
add_link_options(-pthread)
endif()

find_program(MOLD_LINKER mold)
if(MOLD_LINKER)
set(CMAKE_LINKER_TYPE "MOLD")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
find_program(MOLD_LINKER mold)
if(MOLD_LINKER)
set(CMAKE_LINKER_TYPE "MOLD")
endif()
endif()

0 comments on commit 813f424

Please sign in to comment.