mirror of https://github.com/AxioDL/metaforce.git
Add USE_SPLIT_DWARF option for gcc+gold
This commit is contained in:
parent
53fb23fc17
commit
2b45ec3b43
|
@ -295,7 +295,11 @@ if(USE_LD_GOLD)
|
|||
if("${LD_VERSION}" MATCHES "GNU gold")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags")
|
||||
if(USE_LTO)
|
||||
if (USE_SPLIT_DWARF)
|
||||
add_compile_options(-gsplit-dwarf -Wl,--gdb-index)
|
||||
add_link_options(-gsplit-dwarf -Wl,--gdb-index)
|
||||
message(STATUS "GNU gold linker enabled with split DWARF.")
|
||||
elseif (USE_LTO)
|
||||
add_compile_options(-flto)
|
||||
add_link_options(-flto)
|
||||
message(STATUS "GNU gold linker enabled with LTO.")
|
||||
|
|
Loading…
Reference in New Issue