Restrict mold linker to Linux.

This commit is contained in:
Bartosz Taudul 2024-10-30 17:11:51 +01:00
parent caa61de540
commit ee06542f1f
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -39,7 +39,7 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT EMSCRIPTEN)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
endif() endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT EMSCRIPTEN) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_program(MOLD_LINKER mold) find_program(MOLD_LINKER mold)
if(MOLD_LINKER) if(MOLD_LINKER)
set(CMAKE_LINKER_TYPE "MOLD") set(CMAKE_LINKER_TYPE "MOLD")