2016-04-16 15:09:39 +08:00
|
|
|
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
|
2018-03-24 03:57:25 +08:00
|
|
|
import lit.util
|
|
|
|
|
|
|
|
config.have_dia_sdk = lit.util.pythonize_bool("@LLVM_ENABLE_DIA_SDK@")
|
2011-12-18 16:27:59 +08:00
|
|
|
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
|
|
|
|
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
|
|
|
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
|
|
|
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
2021-03-16 03:56:08 +08:00
|
|
|
config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
|
2011-12-18 16:27:59 +08:00
|
|
|
config.lld_obj_root = "@LLD_BINARY_DIR@"
|
2021-02-12 01:32:20 +08:00
|
|
|
config.lld_libs_dir = "@LLD_LIBS_DIR@"
|
|
|
|
config.lld_tools_dir = "@LLD_TOOLS_DIR@"
|
2011-12-18 16:27:59 +08:00
|
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
2020-04-29 09:37:28 +08:00
|
|
|
config.python_executable = "@Python3_EXECUTABLE@"
|
2020-05-01 04:07:13 +08:00
|
|
|
config.have_zlib = @LLVM_ENABLE_ZLIB@
|
2021-04-17 04:46:45 +08:00
|
|
|
config.have_libxar = @HAVE_LIBXAR@
|
2020-07-25 06:47:38 +08:00
|
|
|
config.have_libxml2 = @LLVM_ENABLE_LIBXML2@
|
2019-03-02 02:53:41 +08:00
|
|
|
config.sizeof_void_p = @CMAKE_SIZEOF_VOID_P@
|
2020-10-08 14:34:18 +08:00
|
|
|
config.ld_lld_default_mingw = @LLD_DEFAULT_LD_LLD_IS_MINGW@
|
2011-12-18 16:27:59 +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-08-10 02:51:17 +08:00
|
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
|
|
|
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
|
2021-02-12 01:32:20 +08:00
|
|
|
config.lld_libs_dir = config.lld_libs_dir % lit_config.params
|
|
|
|
config.lld_tools_dir = config.lld_tools_dir % lit_config.params
|
2014-03-26 08:53:48 +08:00
|
|
|
except KeyError as e:
|
2011-12-18 16:27:59 +08:00
|
|
|
key, = e.args
|
2013-08-10 02:51:17 +08:00
|
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
2011-12-18 16:27:59 +08:00
|
|
|
|
2018-08-31 08:23:09 +08:00
|
|
|
import lit.llvm
|
2018-08-31 06:12:16 +08:00
|
|
|
lit.llvm.initialize(lit_config, config)
|
2017-09-19 06:26:48 +08:00
|
|
|
|
2011-12-18 16:27:59 +08:00
|
|
|
# Let the main config do the real work.
|
2017-09-22 01:38:13 +08:00
|
|
|
lit_config.load_config(config, "@LLD_SOURCE_DIR@/test/lit.cfg.py")
|