CMake: don't use *_INIT variables for setting lld linker
find_program(LLD ld.lld)
if(LLD)
message("Found lld: ${LLD}")
- set(CMAKE_EXE_LINKER_FLAGS_INIT
- "-fuse-ld=${LLD} ${CMAKE_EXE_LINKER_FLAGS_INIT}"
- )
- set(CMAKE_MODULE_LINKER_FLAGS_INIT
- "-fuse-ld=${LLD} ${CMAKE_MODULE_LINKER_FLAGS_INIT}"
- )
- set(CMAKE_SHARED_LINKER_FLAGS_INIT
- "-fuse-ld=${LLD} ${CMAKE_SHARED_LINKER_FLAGS_INIT}"
- )
+ set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=${LLD} ${CMAKE_EXE_LINKER_FLAGS}")
+ set(CMAKE_MODULE_LINKER_FLAGS "-fuse-ld=${LLD} ${CMAKE_MODULE_LINKER_FLAGS}")
+ set(CMAKE_SHARED_LINKER_FLAGS "-fuse-ld=${LLD} ${CMAKE_SHARED_LINKER_FLAGS}")
else()
message("lld not found")
endif()
