[PATCH] [libcxx] Move to using libc++abi2.exp as the default symbol list for libc++
Eric Fiselier
eric at efcs.ca
Thu Feb 19 16:28:44 PST 2015
Don't manually link in libc++abi during testing on OS X because the clang linker driver doesn't. The current behavior was hiding a bunch of test failures.
http://reviews.llvm.org/D7773
Files:
cmake/Modules/HandleLibCXXABI.cmake
lib/CMakeLists.txt
test/libcxx/test/config.py
Index: cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- cmake/Modules/HandleLibCXXABI.cmake
+++ cmake/Modules/HandleLibCXXABI.cmake
@@ -79,6 +79,7 @@
if (LIBCXX_CXX_ABI_INTREE)
# Link against just-built "cxxabi" target.
set(CXXABI_LIBNAME cxxabi)
+ set(LIBCXX_LIBCPPABI_VERSION "2" PARENT_SCOPE)
else()
# Assume c++abi is installed in the system, rely on -lc++abi link flag.
set(CXXABI_LIBNAME "c++abi")
Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -57,6 +57,10 @@
append_if(LIBCXX_LINK_FLAGS LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
if ( APPLE )
+ if (NOT DEFINED LIBCXX_LIBCPPABI_VERSION)
+ set(LIBCXX_LIBCPPABI_VERSION "2")
+ endif()
+
if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
list(APPEND LIBCXX_COMPILE_FLAGS "-U__STRICT_ANSI__")
list(APPEND LIBCXX_LINK_FLAGS
Index: test/libcxx/test/config.py
===================================================================
--- test/libcxx/test/config.py
+++ test/libcxx/test/config.py
@@ -434,12 +434,16 @@
def configure_link_flags_abi_library(self):
cxx_abi = self.get_lit_conf('cxx_abi', 'libcxxabi')
+ target_platform = self.target_info.platform()
if cxx_abi == 'libstdc++':
self.cxx.link_flags += ['-lstdc++']
elif cxx_abi == 'libsupc++':
self.cxx.link_flags += ['-lsupc++']
elif cxx_abi == 'libcxxabi':
- self.cxx.link_flags += ['-lc++abi']
+ # Don't link libc++abi on darwin because we should have reexported
+ # the symbols into libc++.
+ if target_platform != 'darwin':
+ self.cxx.link_flags += ['-lc++abi']
elif cxx_abi == 'libcxxrt':
self.cxx.link_flags += ['-lcxxrt']
elif cxx_abi == 'none':
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7773.20356.patch
Type: text/x-patch
Size: 1935 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150220/057c0f6e/attachment.bin>
More information about the cfe-commits
mailing list