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.)

llvm-svn: 198200
This commit is contained in:
Nico Weber 2013-12-30 03:43:30 +00:00
parent d039baad05
commit 194c009352
3 changed files with 5 additions and 2 deletions

View File

@ -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 )

View File

@ -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

View File

@ -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}")