summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-02-05 19:50:47 +0000
committerPetr Hosek <phosek@chromium.org>2019-02-05 19:50:47 +0000
commit317087cfd8e608bd24e53934d59b5b85e0a9ded6 (patch)
treeda2d16a82714da2afdf129dedb85350885d8eb22
parenta2f706e6413d0606c29c6e80961f1f3c0a90ef9e (diff)
downloadlibunwind_llvm-317087cfd8e608bd24e53934d59b5b85e0a9ded6.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@353208 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lit.site.cfg.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 4b4cb7e..34da72a 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -8,7 +8,7 @@ config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
config.llvm_unwinder = True
-config.compiler_rt = @LIBUNWIND_USE_COMPILER_RT@
+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@