[libcxx-commits] [libcxxabi] r353208 - [CMake] Support compiler-rt builtins library in tests

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 5 11:50:48 PST 2019


Author: phosek
Date: Tue Feb  5 11:50:47 2019
New Revision: 353208

URL: http://llvm.org/viewvc/llvm-project?rev=353208&view=rev
Log:
[CMake] Support compiler-rt builtins library in tests

We're building tests with -nostdlib which means that we need to
explicitly include the builtins library. When using libgcc (default)
we can simply include -lgcc_s on the link line, but when using
compiler-rt builtins we need a complete path to the builtins library.

This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY,
so we just need to pass that path to lit and if config.compiler_rt is
true, link it to the test.

Prior to this patch, running tests when compiler-rt is being used as
the builtins library was broken as all tests would fail to link, but
with this change running tests when compiler-rt bultins library is
being used should be supported.

Differential Revision: https://reviews.llvm.org/D56701

Modified:
    libcxxabi/trunk/test/lit.site.cfg.in

Modified: libcxxabi/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.site.cfg.in?rev=353208&r1=353207&r2=353208&view=diff
==============================================================================
--- libcxxabi/trunk/test/lit.site.cfg.in (original)
+++ libcxxabi/trunk/test/lit.site.cfg.in Tue Feb  5 11:50:47 2019
@@ -9,7 +9,7 @@ config.cxx_headers              = "@LIBC
 config.libunwind_headers        = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"
 config.cxx_library_root         = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"
 config.llvm_unwinder            = @LIBCXXABI_USE_LLVM_UNWINDER@
-config.compiler_rt              = @LIBCXXABI_USE_COMPILER_RT@
+config.builtins_library         = "@LIBCXXABI_BUILTINS_LIBRARY@"
 config.enable_threads           = @LIBCXXABI_ENABLE_THREADS@
 config.use_sanitizer            = "@LLVM_USE_SANITIZER@"
 config.sanitizer_library        = "@LIBCXXABI_SANITIZER_LIBRARY@"




More information about the libcxx-commits mailing list