@@ -1,8 +1,19 @@ |
|
|
1 |
|
-## Autogenerated by LLVM/Clang configuration. |
2 |
|
-# Do not edit! |
|
1 |
+@LIT_SITE_CFG_IN_HEADER@ |
|
2 |
+ |
|
3 |
+import sys |
|
4 |
+ |
3 |
5 |
config.llvm_src_root = "@LLVM_SOURCE_DIR@" |
4 |
6 |
config.llvm_obj_root = "@LLVM_BINARY_DIR@" |
5 |
|
-config.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@" |
|
7 |
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
|
8 |
+ |
|
9 |
+# Support substitution of the tools_dir with user parameters. |
|
10 |
+# This is used when we can't determine the tool dir at configuration time. |
|
11 |
+try: |
|
12 |
+ config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params |
|
13 |
+except KeyError: |
|
14 |
+ e = sys.exc_info()[1] |
|
15 |
+ key, = e.args |
|
16 |
+ lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) |
6 |
17 |
|
7 |
18 |
# Let the main config do the real work. |
8 |
19 |
lit_config.load_config(config, "@LLVM_BINARY_DIR@/utils/lit/tests/lit.cfg") |