Skip to content

Commit a3a0638

Browse files
committed
Update build
1 parent 2f8f90e commit a3a0638

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,20 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
268268
# Check for mold linker on general systems and ld64.mold on macOS
269269
if(APPLE)
270270
find_program(MOLD_LINKER ld64.mold)
271-
set(CMAKE_LINKER_TYPE SOLD)
272271
else()
273272
find_program(MOLD_LINKER mold)
274-
set(CMAKE_LINKER_TYPE MOLD)
275273
endif()
276274

277275
if(MOLD_LINKER)
278276
message(STATUS "LINKER_TYPE set to ${CMAKE_LINKER_TYPE} for faster builds")
279277
list(APPEND CMAKE_MESSAGE_INDENT " ")
280278
message(STATUS "(set -DUSE_MOLD=OFF to disable)")
281279
list(POP_BACK CMAKE_MESSAGE_INDENT)
280+
if(APPLE)
281+
set(CMAKE_LINKER_TYPE SOLD)
282+
else()
283+
set(CMAKE_LINKER_TYPE MOLD)
284+
endif()
282285
else()
283286
message(STATUS " -- No suitable mold linker found. Using default linker.")
284287
endif()

0 commit comments

Comments
 (0)