Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bolt/test/Unit/lit.site.cfg.py.in')
-rw-r--r--bolt/test/Unit/lit.site.cfg.py.in16
1 files changed, 3 insertions, 13 deletions
diff --git a/bolt/test/Unit/lit.site.cfg.py.in b/bolt/test/Unit/lit.site.cfg.py.in
index 45a36c58923f..2e04fa0ca32e 100644
--- a/bolt/test/Unit/lit.site.cfg.py.in
+++ b/bolt/test/Unit/lit.site.cfg.py.in
@@ -2,25 +2,15 @@
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.bolt_obj_root = "@BOLT_BINARY_DIR@"
config.bolt_src_root = "@BOLT_SOURCE_DIR@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_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.
-try:
- config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
- config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)