summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/test/CMakeLists.txt2
-rw-r--r--lld/test/lit.cfg6
-rw-r--r--lld/test/lit.site.cfg.in1
3 files changed, 8 insertions, 1 deletions
diff --git a/lld/test/CMakeLists.txt b/lld/test/CMakeLists.txt
index 460e6f8c14d..4bf808d548f 100644
--- a/lld/test/CMakeLists.txt
+++ b/lld/test/CMakeLists.txt
@@ -11,7 +11,7 @@ else()
set(ENABLE_SHARED 0)
endif(BUILD_SHARED_LIBS)
-configure_file(
+configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
diff --git a/lld/test/lit.cfg b/lld/test/lit.cfg
index 4462eca21e6..63426668422 100644
--- a/lld/test/lit.cfg
+++ b/lld/test/lit.cfg
@@ -51,6 +51,12 @@ if lld_obj_root is not None:
config.environment.get('LD_LIBRARY_PATH','')))
config.environment['LD_LIBRARY_PATH'] = path
+ # Propagate LLVM_SRC_ROOT into the environment.
+ config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '')
+
+ # Propagate PYTHON_EXECUTABLE into the environment
+ config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable',
+ '')
###
# Check that the object root is known.
diff --git a/lld/test/lit.site.cfg.in b/lld/test/lit.site.cfg.in
index 43ee120d2b0..ecaf152a3af 100644
--- a/lld/test/lit.site.cfg.in
+++ b/lld/test/lit.site.cfg.in
@@ -7,6 +7,7 @@ config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lld_obj_root = "@LLD_BINARY_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
OpenPOWER on IntegriCloud