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
path: root/bolt
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2022-03-16 01:15:56 +0300
committerSam McCall <sam.mccall@gmail.com>2022-03-16 11:57:41 +0300
commit75acad41bcd6cbe688e0609cbd7649ea8a533195 (patch)
tree7777a5c95930c350b65090c02f2fbd787a52956e /bolt
parent264d96623219e4829bf2a2637410ca0762c2f0b9 (diff)
Use lit_config.substitute instead of foo % lit_config.params everywhere
This mechanically applies the same changes from D121427 everywhere. Differential Revision: https://reviews.llvm.org/D121746
Diffstat (limited to 'bolt')
-rw-r--r--bolt/test/Unit/lit.site.cfg.py.in16
-rw-r--r--bolt/test/lit.site.cfg.py.in17
2 files changed, 6 insertions, 27 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)
diff --git a/bolt/test/lit.site.cfg.py.in b/bolt/test/lit.site.cfg.py.in
index 8c94a5609a9d..1bc8e59b183d 100644
--- a/bolt/test/lit.site.cfg.py.in
+++ b/bolt/test/lit.site.cfg.py.in
@@ -6,9 +6,9 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.bolt_obj_root = "@BOLT_BINARY_DIR@"
config.bolt_enable_runtime = @BOLT_ENABLE_RUNTIME@
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
@@ -22,17 +22,6 @@ config.python_executable = "@PYTHON_EXECUTABLE@"
config.bolt_clang = "@BOLT_CLANG_EXE@"
config.bolt_lld = "@BOLT_LLD_EXE@"
-# 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_shlib_dir = config.llvm_shlib_dir % lit_config.params
- config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
-except KeyError:
- e = sys.exc_info()[1]
- 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)