summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2018-02-27 18:40:04 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2018-02-27 18:40:04 +0000
commit2b0efb9ccf3f3e5cc7486bbb70edc6521e7e9e4f (patch)
tree6b0bab058ca59035b740b6388f1dd8be0b3c557f
parent15e48938df5674b3975ede1d36895e8e07da8de2 (diff)
downloadlibunwind_llvm-2b0efb9ccf3f3e5cc7486bbb70edc6521e7e9e4f.tar.gz
[libunwind] Permit additional compiler and linker flags to be passed to tests.
Summary: This is done via new LIBUNWIND_TEST_COMPILER_FLAGS and LIBUNWIND_TEST_LINKER_FLAGS variables. Reviewed By: sdardis Differential Revision: https://reviews.llvm.org/D43585 git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@326223 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt4
-rw-r--r--test/lit.site.cfg.in2
2 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a132be..31af0cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,6 +139,10 @@ option(LIBUNWIND_INSTALL_LIBRARY "Install the libunwind library." ON)
set(LIBUNWIND_TARGET_TRIPLE "" CACHE STRING "Target triple for cross compiling.")
set(LIBUNWIND_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
set(LIBUNWIND_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
+set(LIBUNWIND_TEST_LINKER_FLAGS "" CACHE STRING
+ "Additional linker flags for test programs.")
+set(LIBUNWIND_TEST_COMPILER_FLAGS "" CACHE STRING
+ "Additional compiler flags for test programs.")
if (NOT LIBUNWIND_ENABLE_SHARED AND NOT LIBUNWIND_ENABLE_STATIC)
message(FATAL_ERROR "libunwind must be built as either a shared or static library.")
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 888b960..8e3bb72 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -12,6 +12,8 @@ config.enable_threads = "@LIBUNWIND_ENABLE_THREADS@"
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
config.enable_32bit = "@LIBUNWIND_BUILD_32_BITS@"
config.target_info = "@LIBUNWIND_TARGET_INFO@"
+config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@"
+config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@"
config.executor = "@LIBUNWIND_EXECUTOR@"
config.libunwind_shared = "@LIBUNWIND_ENABLE_SHARED@"
config.enable_shared = "@LIBCXX_ENABLE_SHARED@"