forked from OSchip/llvm-project
[libcxx] Move to using libc++abi2.exp as the default symbol list for libc++
Summary: libc++abi2.exp should be used whenever `cxxabi.h` defines `_LIBCPPABI_VERSION`. This macro was added to libc++abi in 2012 in r149632. For this reason we should use libc++abi2.exp as default unless otherwise specified. Also when building against an in-tree libc++abi we definitely want to use libc++abi2.exp. I would love to know what OSX was the last to use libc++abi.exp but I can only test on 10.9. Reviewers: danalbert, mclow.lists, EricWF Reviewed By: EricWF Subscribers: meadori, cfe-commits Differential Revision: http://reviews.llvm.org/D7773 llvm-svn: 230119
This commit is contained in:
parent
3b6b7ca2bc
commit
d2852b69ce
|
@ -79,6 +79,7 @@ elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
|
|||
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")
|
||||
|
|
|
@ -57,6 +57,10 @@ append_if(LIBCXX_COMPILE_FLAGS LIBCXX_HAS_FPIC_FLAG -fPIC)
|
|||
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
|
||||
|
|
|
@ -439,7 +439,10 @@ class Configuration(object):
|
|||
elif cxx_abi == 'libsupc++':
|
||||
self.cxx.link_flags += ['-lsupc++']
|
||||
elif cxx_abi == 'libcxxabi':
|
||||
self.cxx.link_flags += ['-lc++abi']
|
||||
# Don't link libc++abi explicitly on OS X because the symbols
|
||||
# should be available in libc++ directly.
|
||||
if self.target_info.platform() != 'darwin':
|
||||
self.cxx.link_flags += ['-lc++abi']
|
||||
elif cxx_abi == 'libcxxrt':
|
||||
self.cxx.link_flags += ['-lcxxrt']
|
||||
elif cxx_abi == 'none':
|
||||
|
|
Loading…
Reference in New Issue