mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
allow use linkers other than default
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
a651e30aa1
commit
de0fdd643b
@ -186,6 +186,18 @@ if(MSVC AND ENABLE_VS_FASTLINK)
|
||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS_DEBUG " /debug:FASTLINK")
|
||||
endif()
|
||||
if(UNIX)
|
||||
find_program(__LD_GOLD_FOUND ld.gold)
|
||||
find_program(__LD_LLD_FOUND ld.lld)
|
||||
if(NOT NEO_DISABLE_LD_LLD AND __LD_LLD_FOUND)
|
||||
message(STATUS "Using linker: ld.lld")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
|
||||
elseif(NOT NEO_DISABLE_LD_GOLD AND __LD_GOLD_FOUND)
|
||||
message(STATUS "Using linker: ld.gold")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
else()
|
||||
message(STATUS "Using linker: default")
|
||||
endif()
|
||||
|
||||
if(NEO_BUILD_DEBUG_SYMBOLS_PACKAGE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g")
|
||||
|
Reference in New Issue
Block a user