diff options
author | Louis Dionne <ldionne@apple.com> | 2019-10-07 18:12:10 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-10-07 18:12:10 +0000 |
commit | 639f74d3fbf0a211eb31092c26574499977236e6 (patch) | |
tree | c64941301b5d5e4335dcfb347840f834918685f5 | |
parent | 4e3fd556ec165586460cb43f0cedb36960ad20c6 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@373934 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | src/CMakeLists.txt | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cbf4b21..8d4eb79 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 |