2016-04-16 14:54:46 +08:00
|
|
|
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
|
2013-08-09 08:44:59 +08:00
|
|
|
import sys
|
|
|
|
|
2014-01-28 06:57:33 +08:00
|
|
|
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
|
|
|
|
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
2009-09-18 03:55:53 +08:00
|
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
2009-09-26 15:36:09 +08:00
|
|
|
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
|
2014-01-08 19:38:47 +08:00
|
|
|
config.llvm_shlib_dir = "@SHLIBDIR@"
|
|
|
|
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
|
2011-06-17 05:47:59 +08:00
|
|
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
2009-09-21 03:04:35 +08:00
|
|
|
config.clang_obj_root = "@CLANG_BINARY_DIR@"
|
2013-12-18 23:08:56 +08:00
|
|
|
config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
|
2014-03-11 12:34:17 +08:00
|
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
2009-11-03 15:25:53 +08:00
|
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
2013-03-26 16:28:18 +08:00
|
|
|
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
|
2016-02-06 10:06:43 +08:00
|
|
|
config.have_zlib = "@HAVE_LIBZ@"
|
2013-08-28 03:27:35 +08:00
|
|
|
config.clang_arcmt = @ENABLE_CLANG_ARCMT@
|
2016-09-29 15:43:08 +08:00
|
|
|
config.clang_default_cxx_stdlib = "@CLANG_DEFAULT_CXX_STDLIB@"
|
2013-08-28 03:27:35 +08:00
|
|
|
config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
|
2014-01-08 19:55:49 +08:00
|
|
|
config.clang_examples = @ENABLE_CLANG_EXAMPLES@
|
2014-01-09 04:06:24 +08:00
|
|
|
config.enable_shared = @ENABLE_SHARED@
|
2015-02-11 03:53:38 +08:00
|
|
|
config.enable_backtrace = "@ENABLE_BACKTRACES@"
|
2013-09-13 19:02:31 +08:00
|
|
|
config.host_arch = "@HOST_ARCH@"
|
2009-09-17 06:30:48 +08:00
|
|
|
|
2009-11-08 07:53:32 +08:00
|
|
|
# Support substitution of the tools and libs dirs with user parameters. This is
|
|
|
|
# used when we can't determine the tool dir at configuration time.
|
|
|
|
try:
|
2013-12-19 02:25:13 +08:00
|
|
|
config.clang_tools_dir = config.clang_tools_dir % lit_config.params
|
2013-08-09 22:43:04 +08:00
|
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
2014-01-08 19:38:47 +08:00
|
|
|
config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
|
2013-08-09 22:43:04 +08:00
|
|
|
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
|
2013-08-09 08:44:59 +08:00
|
|
|
except KeyError:
|
|
|
|
e = sys.exc_info()[1]
|
2009-11-08 07:53:32 +08:00
|
|
|
key, = e.args
|
2013-08-09 22:43:04 +08:00
|
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
2009-11-08 07:53:32 +08:00
|
|
|
|
2009-09-17 06:30:48 +08:00
|
|
|
# Let the main config do the real work.
|
2013-08-09 22:43:04 +08:00
|
|
|
lit_config.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg")
|