[PATCH] D40513: [libcxx] Support the use of compiler-rt in lit tests

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 15:38:12 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rCXX322044: [libcxx] Support the use of compiler-rt in lit tests (authored by phosek, committed by ).

Repository:
  rCXX libc++

https://reviews.llvm.org/D40513

Files:
  test/CMakeLists.txt
  test/lit.site.cfg.in
  utils/libcxx/test/target_info.py


Index: utils/libcxx/test/target_info.py
===================================================================
--- utils/libcxx/test/target_info.py
+++ utils/libcxx/test/target_info.py
@@ -234,7 +234,9 @@
             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']
Index: test/lit.site.cfg.in
===================================================================
--- test/lit.site.cfg.in
+++ test/lit.site.cfg.in
@@ -24,6 +24,7 @@
 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@"
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -30,6 +30,7 @@
 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40513.128996.patch
Type: text/x-patch
Size: 1668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180108/1bd1c937/attachment.bin>


More information about the llvm-commits mailing list