[llvm] r224123 - Disable --icf=safe to avoid a bug.

Rafael Espindola rafael.espindola at gmail.com
Fri Dec 12 06:28:19 PST 2014


Author: rafael
Date: Fri Dec 12 08:28:19 2014
New Revision: 224123

URL: http://llvm.org/viewvc/llvm-project?rev=224123&view=rev
Log:
Disable --icf=safe to avoid a bug.

Thanks to Sameer Sahasrabuddhe for the report!

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=224123&r1=224122&r2=224123&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Fri Dec 12 08:28:19 2014
@@ -161,7 +161,9 @@ 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 -Wl,--icf=safe")
+                 LINK_FLAGS " -Wl,--gc-sections")
+    # Note that there is a bug with -Wl,--icf=safe so it is not safe
+    # to enable. See https://sourceware.org/bugzilla/show_bug.cgi?id=17704.
   endif()
 
   if(NOT LLVM_NO_DEAD_STRIP)





More information about the llvm-commits mailing list