[libcxx-commits] [PATCH] D56701: [CMake] Support compiler-rt builtins library in tests

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 4 14:53:14 PST 2019


phosek updated this revision to Diff 185166.
phosek marked an inline comment as done.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56701/new/

https://reviews.llvm.org/D56701

Files:
  libcxx/docs/TestingLibcxx.rst
  libcxx/test/lit.site.cfg.in
  libcxx/utils/libcxx/test/target_info.py
  libcxxabi/test/lit.site.cfg.in
  libunwind/test/lit.site.cfg.in


Index: libunwind/test/lit.site.cfg.in
===================================================================
--- libunwind/test/lit.site.cfg.in
+++ libunwind/test/lit.site.cfg.in
@@ -8,6 +8,7 @@
 config.libunwind_headers        = "@LIBUNWIND_SOURCE_DIR@/include"
 config.cxx_library_root         = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
 config.llvm_unwinder            = "1"
+config.builtins_library         = "@LIBUNWIND_BUILTINS_LIBRARY@"
 config.enable_threads           = "@LIBUNWIND_ENABLE_THREADS@"
 config.use_sanitizer            = "@LLVM_USE_SANITIZER@"
 config.enable_32bit             = "@LIBUNWIND_BUILD_32_BITS@"
Index: libcxxabi/test/lit.site.cfg.in
===================================================================
--- libcxxabi/test/lit.site.cfg.in
+++ libcxxabi/test/lit.site.cfg.in
@@ -9,6 +9,7 @@
 config.libunwind_headers        = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"
 config.cxx_library_root         = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"
 config.llvm_unwinder            = "@LIBCXXABI_USE_LLVM_UNWINDER@"
+config.builtins_library         = "@LIBCXXABI_BUILTINS_LIBRARY@"
 config.enable_threads           = "@LIBCXXABI_ENABLE_THREADS@"
 config.use_sanitizer            = "@LLVM_USE_SANITIZER@"
 config.sanitizer_library        = "@LIBCXXABI_SANITIZER_LIBRARY@"
Index: libcxx/utils/libcxx/test/target_info.py
===================================================================
--- libcxx/utils/libcxx/test/target_info.py
+++ libcxx/utils/libcxx/test/target_info.py
@@ -251,8 +251,10 @@
             flags += ['-lunwind', '-ldl']
         else:
             flags += ['-lgcc_s']
-        compiler_rt = self.full_config.get_lit_bool('compiler_rt', False)
-        if not compiler_rt:
+        builtins_lib = self.full_config.get_lit_conf('builtins_library')
+        if builtins_lib:
+            flags += [builtins_lib]
+        else:
             flags += ['-lgcc']
         use_libatomic = self.full_config.get_lit_bool('use_libatomic', False)
         if use_libatomic:
Index: libcxx/test/lit.site.cfg.in
===================================================================
--- libcxx/test/lit.site.cfg.in
+++ libcxx/test/lit.site.cfg.in
@@ -27,7 +27,7 @@
 
 config.executor                 = "@LIBCXX_EXECUTOR@"
 config.llvm_unwinder            = "@LIBCXXABI_USE_LLVM_UNWINDER@"
-config.compiler_rt              = "@LIBCXX_USE_COMPILER_RT@"
+config.builtins_library         = "@LIBCXX_BUILTINS_LIBRARY@"
 config.has_libatomic            = "@LIBCXX_HAS_ATOMIC_LIB@"
 config.use_libatomic            = "@LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB@"
 config.debug_build              = "@LIBCXX_DEBUG_BUILD@"
Index: libcxx/docs/TestingLibcxx.rst
===================================================================
--- libcxx/docs/TestingLibcxx.rst
+++ libcxx/docs/TestingLibcxx.rst
@@ -183,6 +183,14 @@
   option is specified or the environment variable LIBCXX_COLOR_DIAGNOSTICS is
   present then color diagnostics will be enabled.
 
+.. option:: llvm_unwinder
+
+  Enable the use of LLVM unwinder instead of libgcc.
+
+.. option:: builtins_library
+
+  Path to the builtins library to use instead of libgcc.
+
 
 Environment Variables
 ---------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56701.185166.patch
Type: text/x-patch
Size: 3165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190204/0af4080c/attachment.bin>


More information about the libcxx-commits mailing list