Also use --icf=safe if we are being linked by gold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-12-04 22:16:08 +00:00
parent 924476a79d
commit 838e18116d

View File

@ -161,7 +161,7 @@ function(add_link_opts target_name)
if(LLVM_LINKER_IS_GOLD)
# With gold gc-sections is always safe.
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--gc-sections")
LINK_FLAGS " -Wl,--gc-sections -Wl,--icf=safe")
endif()
if(NOT LLVM_NO_DEAD_STRIP)