[libcxx] r322044 - [libcxx] Support the use of compiler-rt in lit tests
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 8 15:36:53 PST 2018
Author: phosek
Date: Mon Jan 8 15:36:53 2018
New Revision: 322044
URL: http://llvm.org/viewvc/llvm-project?rev=322044&view=rev
Log:
[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
Modified:
libcxx/trunk/test/CMakeLists.txt
libcxx/trunk/test/lit.site.cfg.in
libcxx/trunk/utils/libcxx/test/target_info.py
Modified: libcxx/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/CMakeLists.txt?rev=322044&r1=322043&r2=322044&view=diff
==============================================================================
--- libcxx/trunk/test/CMakeLists.txt (original)
+++ libcxx/trunk/test/CMakeLists.txt Mon Jan 8 15:36:53 2018
@@ -30,6 +30,7 @@ pythonize_bool(LIBCXX_BUILD_32_BITS)
pythonize_bool(LIBCXX_GENERATE_COVERAGE)
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
+pythonize_bool(LIBCXX_USE_COMPILER_RT)
pythonize_bool(LIBCXX_HAS_ATOMIC_LIB)
pythonize_bool(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
pythonize_bool(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
Modified: libcxx/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.site.cfg.in?rev=322044&r1=322043&r2=322044&view=diff
==============================================================================
--- libcxx/trunk/test/lit.site.cfg.in (original)
+++ libcxx/trunk/test/lit.site.cfg.in Mon Jan 8 15:36:53 2018
@@ -24,6 +24,7 @@ config.generate_coverage = "@LIBC
config.target_info = "@LIBCXX_TARGET_INFO@"
config.executor = "@LIBCXX_EXECUTOR@"
config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@"
+config.compiler_rt = "@LIBCXX_USE_COMPILER_RT@"
config.has_libatomic = "@LIBCXX_HAS_ATOMIC_LIB@"
config.use_libatomic = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@"
config.debug_build = "@LIBCXX_DEBUG_BUILD@"
Modified: libcxx/trunk/utils/libcxx/test/target_info.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/target_info.py?rev=322044&r1=322043&r2=322044&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/test/target_info.py (original)
+++ libcxx/trunk/utils/libcxx/test/target_info.py Mon Jan 8 15:36:53 2018
@@ -234,7 +234,9 @@ class LinuxLocalTI(DefaultTargetInfo):
flags += ['-lunwind', '-ldl']
else:
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)
if use_libatomic:
flags += ['-latomic']
More information about the cfe-commits
mailing list