[libcxx] Support the use of compiler-rt in lit tests
Don't link tests against libgcc when compiler-rt is being used. Differential Revision: https://reviews.llvm.org/D40513 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322044 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,6 +30,7 @@ pythonize_bool(LIBCXX_BUILD_32_BITS)
|
|||||||
pythonize_bool(LIBCXX_GENERATE_COVERAGE)
|
pythonize_bool(LIBCXX_GENERATE_COVERAGE)
|
||||||
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
|
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
|
||||||
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
|
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
|
||||||
|
pythonize_bool(LIBCXX_USE_COMPILER_RT)
|
||||||
pythonize_bool(LIBCXX_HAS_ATOMIC_LIB)
|
pythonize_bool(LIBCXX_HAS_ATOMIC_LIB)
|
||||||
pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
|
pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
|
||||||
pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
|
pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ config.generate_coverage = "@LIBCXX_GENERATE_COVERAGE@"
|
|||||||
config.target_info = "@LIBCXX_TARGET_INFO@"
|
config.target_info = "@LIBCXX_TARGET_INFO@"
|
||||||
config.executor = "@LIBCXX_EXECUTOR@"
|
config.executor = "@LIBCXX_EXECUTOR@"
|
||||||
config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@"
|
config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@"
|
||||||
|
config.compiler_rt = "@LIBCXX_USE_COMPILER_RT@"
|
||||||
config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@"
|
config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@"
|
||||||
config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@"
|
config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@"
|
||||||
config.debug_build = "@LIBCXX_DEBUG_BUILD@"
|
config.debug_build = "@LIBCXX_DEBUG_BUILD@"
|
||||||
|
|||||||
@@ -234,7 +234,9 @@ class LinuxLocalTI(DefaultTargetInfo):
|
|||||||
flags += ['-lunwind', '-ldl']
|
flags += ['-lunwind', '-ldl']
|
||||||
else:
|
else:
|
||||||
flags += ['-lgcc_s']
|
flags += ['-lgcc_s']
|
||||||
flags += ['-lgcc']
|
compiler_rt = self.full_config.get_lit_bool('compiler_rt', False)
|
||||||
|
if not compiler_rt:
|
||||||
|
flags += ['-lgcc']
|
||||||
use_libatomic = self.full_config.get_lit_bool('use_libatomic', False)
|
use_libatomic = self.full_config.get_lit_bool('use_libatomic', False)
|
||||||
if use_libatomic:
|
if use_libatomic:
|
||||||
flags += ['-latomic']
|
flags += ['-latomic']
|
||||||
|
|||||||
Reference in New Issue
Block a user