summaryrefslogtreecommitdiff
path: root/test/lit.common.configured.in
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 /test/lit.common.configured.in
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 'test/lit.common.configured.in')
-rw-r--r--test/lit.common.configured.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/lit.common.configured.in b/test/lit.common.configured.in
index b49e8eb9a..c39a2e4af 100644
--- a/test/lit.common.configured.in
+++ b/test/lit.common.configured.in
@@ -16,14 +16,14 @@ set_default("llvm_src_root", "@LLVM_MAIN_SRC_DIR@")
set_default("llvm_obj_root", "@LLVM_BINARY_DIR@")
set_default("compiler_rt_src_root", "@COMPILER_RT_SOURCE_DIR@")
set_default("compiler_rt_obj_root", "@COMPILER_RT_BINARY_DIR@")
-set_default("llvm_tools_dir", "@LLVM_TOOLS_BINARY_DIR@")
+set_default("llvm_tools_dir", "@LLVM_TOOLS_DIR@")
set_default("llvm_shlib_dir", "@LLVM_LIBRARY_OUTPUT_INTDIR@")
set_default("gold_executable", "@GOLD_EXECUTABLE@")
-set_default("clang", "@COMPILER_RT_TEST_COMPILER@")
+set_default("clang", "@COMPILER_RT_RESOLVED_TEST_COMPILER@")
set_default("compiler_id", "@COMPILER_RT_TEST_COMPILER_ID@")
set_default("python_executable", "@PYTHON_EXECUTABLE@")
set_default("compiler_rt_debug", @COMPILER_RT_DEBUG_PYBOOL@)
-set_default("compiler_rt_libdir", "@COMPILER_RT_LIBRARY_OUTPUT_DIR@")
+set_default("compiler_rt_libdir", "@COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR@")
set_default("emulator", "@COMPILER_RT_EMULATOR@")
set_default("ios", False)
set_default("iossim", False)
@@ -39,9 +39,14 @@ config.available_features.add('target-is-%s' % config.target_arch)
# apply substitution.
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+ config.clang = config.clang % lit_config.params
+ config.compiler_rt_libdir = config.compiler_rt_libdir % lit_config.params
except KeyError as e:
key, = e.args
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
+if not os.path.exists(config.clang):
+ lit_config.fatal("Can't find compiler on path %r" % config.clang)
+
# Setup attributes common for all compiler-rt projects.
lit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/test/lit.common.cfg")