• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@LIT_SITE_CFG_IN_HEADER@
2
3import sys
4
5config.llvm_src_root = "@LLVM_SOURCE_DIR@"
6config.llvm_obj_root = "@LLVM_BINARY_DIR@"
7config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
8config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
9config.llvm_shlib_dir = "@SHLIBDIR@"
10config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
11config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
12config.clang_obj_root = "@CLANG_BINARY_DIR@"
13config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
14config.host_triple = "@LLVM_HOST_TRIPLE@"
15config.target_triple = "@TARGET_TRIPLE@"
16config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
17config.have_zlib = "@HAVE_LIBZ@"
18config.clang_arcmt = @ENABLE_CLANG_ARCMT@
19config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
20config.clang_examples = @ENABLE_CLANG_EXAMPLES@
21config.enable_shared = @ENABLE_SHARED@
22config.enable_backtrace = "@ENABLE_BACKTRACES@"
23config.host_arch = "@HOST_ARCH@"
24
25# Support substitution of the tools and libs dirs with user parameters. This is
26# used when we can't determine the tool dir at configuration time.
27try:
28    config.clang_tools_dir = config.clang_tools_dir % lit_config.params
29    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
30    config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
31    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
32except KeyError:
33    e = sys.exc_info()[1]
34    key, = e.args
35    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
36
37# Let the main config do the real work.
38lit_config.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg")
39