Home | History | Annotate | Download | only in test
      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_tools_dir = "@CLANG_TOOLS_DIR@"
     14 config.host_triple = "@LLVM_HOST_TRIPLE@"
     15 config.target_triple = "@TARGET_TRIPLE@"
     16 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
     17 config.have_zlib = "@HAVE_LIBZ@"
     18 config.clang_arcmt = @ENABLE_CLANG_ARCMT@
     19 config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
     20 config.clang_examples = @ENABLE_CLANG_EXAMPLES@
     21 config.enable_shared = @ENABLE_SHARED@
     22 config.enable_backtrace = "@ENABLE_BACKTRACES@"
     23 config.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.
     27 try:
     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
     32 except 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.
     38 lit_config.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg")
     39