1@LIT_SITE_CFG_IN_HEADER@
2
3import sys
4
5config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
6config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
7config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
8config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@")
9config.llvm_build_mode = "@LLVM_BUILD_MODE@"
10config.clang_obj_root = path(r"@CLANG_BINARY_DIR@")
11config.enable_shared = @ENABLE_SHARED@
12config.shlibdir = path(r"@SHLIBDIR@")
13config.target_triple = "@TARGET_TRIPLE@"
14
15# Support substitution of the tools_dir, libs_dirs, and build_mode with user
16# parameters. This is used when we can't determine the tool dir at
17# configuration time.
18try:
19    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
20    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
21    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
22except KeyError:
23    e = sys.exc_info()[1]
24    key, = e.args
25    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
26
27# Let the main config do the real work.
28lit_config.load_config(
29    config, os.path.join(path(r"@CLANG_SOURCE_DIR@"), "test/Unit/lit.cfg.py"))
30