blob: 1fef001be62715ce3efda84f2b9d49da6b7a3fc0 [file] [log] [blame]
Alex Denisovb6777062016-04-16 06:47:41 +00001@LIT_SITE_CFG_IN_HEADER@
2
Daniel Dunbar4229b952013-08-07 23:09:10 +00003import sys
4
Daniel Dunbarfb4fb6d2009-11-08 09:07:51 +00005config.llvm_src_root = "@LLVM_SOURCE_DIR@"
6config.llvm_obj_root = "@LLVM_BINARY_DIR@"
7config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
Daniel Dunbarfb4fb6d2009-11-08 09:07:51 +00008config.llvm_build_mode = "@LLVM_BUILD_MODE@"
Jeffrey Yasskinc9017192010-02-25 06:34:33 +00009config.enable_shared = @ENABLE_SHARED@
NAKAMURA Takumi38d439f2010-11-29 00:20:21 +000010config.shlibdir = "@SHLIBDIR@"
Daniel Dunbarfb4fb6d2009-11-08 09:07:51 +000011
NAKAMURA Takumid420e7b2010-11-27 13:10:11 +000012# 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.
14try:
Daniel Dunbar27c35d92013-08-09 16:22:05 +000015 config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
16 config.llvm_build_mode = config.llvm_build_mode % lit_config.params
Daniel Dunbar4229b952013-08-07 23:09:10 +000017except KeyError:
18 e = sys.exc_info()[1]
NAKAMURA Takumid420e7b2010-11-27 13:10:11 +000019 key, = e.args
Daniel Dunbar27c35d92013-08-09 16:22:05 +000020 lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
NAKAMURA Takumid420e7b2010-11-27 13:10:11 +000021
Daniel Dunbarfb4fb6d2009-11-08 09:07:51 +000022# Let the main config do the real work.
Zachary Turner1e4a1252017-09-21 00:24:52 +000023lit_config.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg.py")