summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorGreg Bedwell <greg_bedwell@sn.scee.net>2017-11-13 12:57:54 +0000
committerGreg Bedwell <greg_bedwell@sn.scee.net>2017-11-13 12:57:54 +0000
commit1ad28c758255a9594220c5210bbc6fed26e6da07 (patch)
tree5cc682119844c5e5be108507ae6b68b03416f5f9 /unittests
parentf4cd4c0822cf29a2d9b933c4dfe000bef46ea88c (diff)
Allow compiler-rt test targets to work with multi-config CMake generators
Multi-config CMake generators need lit to be able to resolve paths of artifacts from previous build steps at lit time, rather than expect them to be fully resolved at CMake time as they may contain the build mode. Differential Revision: https://reviews.llvm.org/D38471 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/CMakeLists.txt4
-rw-r--r--unittests/lit.common.unit.configured.in5
2 files changed, 5 insertions, 4 deletions
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
index e5059bd91..88f9865a6 100644
--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -1,6 +1,6 @@
-# Needed for lit support
+# Needed for lit support in standalone builds.
include(AddLLVM)
-configure_lit_site_cfg(
+configure_compiler_rt_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.common.unit.configured.in
${CMAKE_CURRENT_BINARY_DIR}/lit.common.unit.configured)
diff --git a/unittests/lit.common.unit.configured.in b/unittests/lit.common.unit.configured.in
index dd36985fe..fafac19b7 100644
--- a/unittests/lit.common.unit.configured.in
+++ b/unittests/lit.common.unit.configured.in
@@ -4,9 +4,9 @@
config.target_triple = "@TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.compiler_rt_libdir = "@COMPILER_RT_LIBRARY_OUTPUT_DIR@"
+config.compiler_rt_libdir = "@COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR@"
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.host_arch = "@HOST_ARCH@"
config.host_os = "@HOST_OS@"
@@ -15,6 +15,7 @@ config.host_os = "@HOST_OS@"
# so try to apply substitution.
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+ config.compiler_rt_libdir = config.compiler_rt_libdir % lit_config.params
config.llvm_build_mode = config.llvm_build_mode % lit_config.params
except KeyError as e:
key, = e.args