From 1ad28c758255a9594220c5210bbc6fed26e6da07 Mon Sep 17 00:00:00 2001 From: Greg Bedwell Date: Mon, 13 Nov 2017 12:57:54 +0000 Subject: 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 --- unittests/CMakeLists.txt | 4 ++-- unittests/lit.common.unit.configured.in | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'unittests') 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 -- cgit v1.2.3