Alex Denisov | b677706 | 2016-04-16 06:47:41 +0000 | [diff] [blame] | 1 | @LIT_SITE_CFG_IN_HEADER@ |
| 2 | |
Daniel Dunbar | 4229b95 | 2013-08-07 23:09:10 +0000 | [diff] [blame] | 3 | import sys |
| 4 | |
Daniel Dunbar | fb4fb6d | 2009-11-08 09:07:51 +0000 | [diff] [blame] | 5 | config.llvm_src_root = "@LLVM_SOURCE_DIR@" |
| 6 | config.llvm_obj_root = "@LLVM_BINARY_DIR@" |
| 7 | config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
Daniel Dunbar | fb4fb6d | 2009-11-08 09:07:51 +0000 | [diff] [blame] | 8 | config.llvm_build_mode = "@LLVM_BUILD_MODE@" |
Jeffrey Yasskin | c901719 | 2010-02-25 06:34:33 +0000 | [diff] [blame] | 9 | config.enable_shared = @ENABLE_SHARED@ |
NAKAMURA Takumi | 38d439f | 2010-11-29 00:20:21 +0000 | [diff] [blame] | 10 | config.shlibdir = "@SHLIBDIR@" |
Daniel Dunbar | fb4fb6d | 2009-11-08 09:07:51 +0000 | [diff] [blame] | 11 | |
NAKAMURA Takumi | d420e7b | 2010-11-27 13:10:11 +0000 | [diff] [blame] | 12 | # Support substitution of the tools_dir and build_mode with user parameters. |
| 13 | # This is used when we can't determine the tool dir at configuration time. |
| 14 | try: |
Daniel Dunbar | 27c35d9 | 2013-08-09 16:22:05 +0000 | [diff] [blame] | 15 | config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params |
| 16 | config.llvm_build_mode = config.llvm_build_mode % lit_config.params |
Daniel Dunbar | 4229b95 | 2013-08-07 23:09:10 +0000 | [diff] [blame] | 17 | except KeyError: |
| 18 | e = sys.exc_info()[1] |
NAKAMURA Takumi | d420e7b | 2010-11-27 13:10:11 +0000 | [diff] [blame] | 19 | key, = e.args |
Daniel Dunbar | 27c35d9 | 2013-08-09 16:22:05 +0000 | [diff] [blame] | 20 | lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) |
NAKAMURA Takumi | d420e7b | 2010-11-27 13:10:11 +0000 | [diff] [blame] | 21 | |
Daniel Dunbar | fb4fb6d | 2009-11-08 09:07:51 +0000 | [diff] [blame] | 22 | # Let the main config do the real work. |
Zachary Turner | 1e4a125 | 2017-09-21 00:24:52 +0000 | [diff] [blame] | 23 | lit_config.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg.py") |