1 | @LIT_SITE_CFG_IN_HEADER@ |
2 | |
3 | import sys |
4 | |
5 | config.llvm_src_root = "@LLVM_SOURCE_DIR@" |
6 | config.llvm_obj_root = "@LLVM_BINARY_DIR@" |
7 | config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
8 | config.llvm_libs_dir = "@LLVM_LIBS_DIR@" |
9 | config.llvm_shlib_dir = "@SHLIBDIR@" |
10 | config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@" |
11 | config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" |
12 | config.clang_obj_root = "@CLANG_BINARY_DIR@" |
13 | config.clang_src_dir = "@CLANG_SOURCE_DIR@" |
14 | config.clang_tools_dir = "@CLANG_TOOLS_DIR@" |
15 | config.host_triple = "@LLVM_HOST_TRIPLE@" |
16 | config.target_triple = "@TARGET_TRIPLE@" |
17 | config.host_cxx = "@CMAKE_CXX_COMPILER@" |
18 | config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" |
19 | config.have_zlib = @HAVE_LIBZ@ |
20 | config.clang_arcmt = @CLANG_ENABLE_ARCMT@ |
21 | config.clang_default_cxx_stdlib = "@CLANG_DEFAULT_CXX_STDLIB@" |
22 | config.clang_staticanalyzer = @CLANG_ENABLE_STATIC_ANALYZER@ |
23 | config.clang_staticanalyzer_z3 = "@LLVM_WITH_Z3@" |
24 | config.clang_examples = @CLANG_BUILD_EXAMPLES@ |
25 | config.enable_shared = @ENABLE_SHARED@ |
26 | config.enable_backtrace = @ENABLE_BACKTRACES@ |
27 | config.host_arch = "@HOST_ARCH@" |
28 | config.python_executable = "@PYTHON_EXECUTABLE@" |
29 | config.use_z3_solver = lit_config.params.get('USE_Z3_SOLVER', "@USE_Z3_SOLVER@") |
30 | |
31 | # Support substitution of the tools and libs dirs with user parameters. This is |
32 | # used when we can't determine the tool dir at configuration time. |
33 | try: |
34 | config.clang_tools_dir = config.clang_tools_dir % lit_config.params |
35 | config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params |
36 | config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params |
37 | config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params |
38 | except KeyError: |
39 | e = sys.exc_info()[1] |
40 | key, = e.args |
41 | lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) |
42 | |
43 | import lit.llvm |
44 | lit.llvm.initialize(lit_config, config) |
45 | |
46 | # Let the main config do the real work. |
47 | lit_config.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg.py") |
48 | |