summaryrefslogtreecommitdiffstats
path: root/test/lit.site.cfg.in
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-07 23:53:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-07 23:53:32 +0000
commit1e63492a1408c0152251cc9e77cf42b7fd53169f (patch)
treeb136df3c80883d549c0f81deba629fde735e5667 /test/lit.site.cfg.in
parent23354213c3a2506f6fca1833fe77a77c6c60de38 (diff)
Rework site config for cmake to be generated at configure time, and only pass
the 'build_config' value in at runtime using the new lit runtime user parameter feature. This simplifies things and drops a dependency on 'sed', FWIW. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.site.cfg.in')
-rw-r--r--test/lit.site.cfg.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index c88c90b7c5..0d452ef6b5 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -7,5 +7,14 @@ config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.clang_obj_root = "@CLANG_BINARY_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
+# 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.params
+ config.llvm_libs_dir = config.llvm_libs_dir % lit.params
+except KeyError,e:
+ key, = e.args
+ lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
# Let the main config do the real work.
lit.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg")