r198200 - Port r198088 (set NO_DEAD_STRIP for clang) from make to cmake.

Nico Weber nicolasweber at gmx.de
Sun Dec 29 19:43:30 PST 2013


Author: nico
Date: Sun Dec 29 21:43:30 2013
New Revision: 198200

URL: http://llvm.org/viewvc/llvm-project?rev=198200&view=rev
Log:
Port r198088 (set NO_DEAD_STRIP for clang) from make to cmake.

Also stop setting passing -dead_strip explicitly for libclang and instead
rely on this now happening by default. (And make it happen by default for
add_clang_library, which doesn't use the library cmake functions from llvm.)

Modified:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/tools/driver/CMakeLists.txt
    cfe/trunk/tools/libclang/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=198200&r1=198199&r2=198200&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Sun Dec 29 21:43:30 2013
@@ -305,6 +305,7 @@ macro(add_clang_library name)
     set(libkind)
   endif()
   add_library( ${name} ${libkind} ${srcs} )
+  add_dead_strip( ${name} )
   if( LLVM_COMMON_DEPENDS )
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )

Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=198200&r1=198199&r2=198200&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Sun Dec 29 21:43:30 2013
@@ -16,6 +16,9 @@ set( LLVM_LINK_COMPONENTS
   Vectorize
   )
 
+# Support plugins.
+set(LLVM_NO_DEAD_STRIP 1)
+
 add_clang_executable(clang
   driver.cpp
   cc1_main.cpp

Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=198200&r1=198199&r2=198200&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Sun Dec 29 21:43:30 2013
@@ -84,8 +84,7 @@ if( LLVM_ENABLE_PIC )
   endif()
 
   if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(LIBCLANG_LINK_FLAGS
-      " -Wl,-compatibility_version -Wl,1 -Wl,-dead_strip")
+    set(LIBCLANG_LINK_FLAGS " -Wl,-compatibility_version -Wl,1")
     if (DEFINED ${LLVM_SUBMIT_VERSION})
       set(LIBCLANG_LINK_FLAGS
         "${LIBCLANG_LINK_FLAGS} -Wl,-current_version -Wl,${LLVM_SUBMIT_VERSION}.${LLVM_SUBMIT_SUBVERSION}")





More information about the cfe-commits mailing list