mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 14:20:17 +00:00
[libc++abi] Remove redundant link flags on Apple platforms
These flags are already set when we create the cxxabi_shared target using the SOVERSION and VERSION target properties, and the install_name was already being overriden to '@rpath/libc++abi.1.dylib' by CMake because no 'CMAKE_INSTALL_NAME_DIR' option was specified. So this is effectively a removal of dead code with no intended functionality change. The only think we're losing here is that we used to link against libSystem.B.dylib instead of libSystem.dylib when building libc++abi for macOS 10.6 -- however, I strongly suspect nobody's building libc++abi from source for that target anymore. llvm-svn: 373934
This commit is contained in:
parent
29f7e17cb8
commit
f385a38140
@ -103,23 +103,7 @@ endif ()
|
||||
# Setup flags.
|
||||
add_link_flags_if_supported(-nodefaultlibs)
|
||||
|
||||
set(LIBCXXABI_SHARED_LINK_FLAGS)
|
||||
|
||||
if ( APPLE )
|
||||
if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
|
||||
list(APPEND LIBCXXABI_COMPILE_FLAGS "-U__STRICT_ANSI__")
|
||||
list(APPEND LIBCXXABI_SHARED_LINK_FLAGS
|
||||
"-compatibility_version 1"
|
||||
"-current_version 1"
|
||||
"-install_name /usr/lib/libc++abi.1.dylib")
|
||||
list(APPEND LIBCXXABI_LINK_FLAGS
|
||||
"/usr/lib/libSystem.B.dylib")
|
||||
else()
|
||||
list(APPEND LIBCXXABI_SHARED_LINK_FLAGS
|
||||
"-compatibility_version 1"
|
||||
"-install_name /usr/lib/libc++abi.1.dylib")
|
||||
endif()
|
||||
|
||||
if (LLVM_USE_SANITIZER)
|
||||
if (("${LLVM_USE_SANITIZER}" STREQUAL "Address") OR
|
||||
("${LLVM_USE_SANITIZER}" STREQUAL "Address;Undefined") OR
|
||||
@ -148,7 +132,6 @@ endif()
|
||||
|
||||
split_list(LIBCXXABI_COMPILE_FLAGS)
|
||||
split_list(LIBCXXABI_LINK_FLAGS)
|
||||
split_list(LIBCXXABI_SHARED_LINK_FLAGS)
|
||||
|
||||
# FIXME: libc++abi.so will not link when modules are enabled because it depends
|
||||
# on symbols defined in libc++.so which has not yet been built.
|
||||
@ -187,7 +170,7 @@ if (LIBCXXABI_ENABLE_SHARED)
|
||||
COMPILE_FLAGS
|
||||
"${LIBCXXABI_COMPILE_FLAGS}"
|
||||
LINK_FLAGS
|
||||
"${LIBCXXABI_LINK_FLAGS} ${LIBCXXABI_SHARED_LINK_FLAGS}"
|
||||
"${LIBCXXABI_LINK_FLAGS}"
|
||||
OUTPUT_NAME
|
||||
"c++abi"
|
||||
SOVERSION
|
||||
|
Loading…
Reference in New Issue
Block a user