Rework libatomic handling in CMake and LIT.

This patch updates the way libc++ handles checking for libatomic, in part
to prepare for https://reviews.llvm.org/D22073.

Changes:
* 'LIBCXX_HAS_ATOMIC_LIB' is now set whenever libatomic is available even libc++
   doesn't need to manually link it.
* 'LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB' is now used to detect when libatomic
   needs to be manually linked.
* 'LIBCXX_HAS_ATOMIC_LIB' now adds 'libatomic' as a available feature in the
   test suite.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@275759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-07-18 06:01:50 +00:00
parent 755baa9f4e
commit 5432e3b9a1
5 changed files with 9 additions and 3 deletions

View File

@@ -290,6 +290,9 @@ class Configuration(object):
if self.cxx.hasCompileFlag('-fsized-deallocation'):
self.config.available_features.add('fsized-deallocation')
if self.get_lit_bool('has_libatomic', False):
self.config.available_features.add('libatomic')
def configure_compile_flags(self):
no_default_flags = self.get_lit_bool('no_default_flags', False)
if not no_default_flags: