Fix LTO for gcc/gold

This commit is contained in:
Luke Street 2020-05-27 13:35:40 -04:00
parent ebb994d8bc
commit 9fd631249e
1 changed files with 2 additions and 2 deletions

View File

@ -233,8 +233,8 @@ if(USE_LD_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)
add_compile_options(-flto=thin)
add_link_options(-flto=thin)
add_compile_options(-flto)
add_link_options(-flto)
message(STATUS "GNU gold linker enabled with LTO.")
else()
message(STATUS "GNU gold linker enabled.")