build: don't try to use mold with gcc at the moment

This commit is contained in:
Marcus Holland-Moritz 2024-01-14 14:25:45 +01:00
parent 0162aba94e
commit 4966013395

View File

@ -75,9 +75,11 @@ endif()
if(NOT WIN32)
if(NOT DISABLE_MOLD)
find_program(MOLD_EXE mold)
if(MOLD_EXE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${MOLD_EXE}")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
find_program(MOLD_EXE mold)
if(MOLD_EXE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${MOLD_EXE}")
endif()
endif()
endif()
endif()