2017-12-13 00:54:20 +08:00
|
|
|
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
|
2019-11-01 00:51:53 +08:00
|
|
|
import sys
|
2017-12-13 00:54:20 +08:00
|
|
|
import lit.util
|
|
|
|
|
2021-02-24 19:09:18 +08:00
|
|
|
config.targets_to_build = "@TARGETS_TO_BUILD@".split()
|
2017-12-13 00:54:20 +08:00
|
|
|
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
|
|
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
|
|
|
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
|
|
|
|
config.llvm_shlib_dir = "@SHLIBDIR@"
|
2018-11-07 05:54:27 +08:00
|
|
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
2017-12-13 00:54:20 +08:00
|
|
|
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
|
2021-02-11 23:41:32 +08:00
|
|
|
config.cross_project_tests_obj_root = "@CROSS_PROJECT_TESTS_BINARY_DIR@"
|
|
|
|
config.cross_project_tests_src_root = "@CROSS_PROJECT_TESTS_SOURCE_DIR@"
|
2017-12-13 00:54:20 +08:00
|
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
2021-12-02 17:04:46 +08:00
|
|
|
config.target_triple = "@LLVM_TARGET_TRIPLE@"
|
2019-05-30 05:45:43 +08:00
|
|
|
config.is_msvc = lit.util.pythonize_bool("@MSVC@")
|
2021-02-09 22:57:03 +08:00
|
|
|
config.llvm_enabled_projects = "@LLVM_ENABLE_PROJECTS@".split(";")
|
2017-12-13 00:54:20 +08:00
|
|
|
|
2020-09-29 21:19:54 +08:00
|
|
|
config.mlir_src_root = "@MLIR_SOURCE_DIR@"
|
|
|
|
|
2017-12-13 00:54:20 +08:00
|
|
|
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
|
|
|
|
|
2019-11-01 00:51:53 +08:00
|
|
|
# Support substitution of the tools_dir with user parameters. This is
|
|
|
|
# used when we can't determine the tool dir at configuration time.
|
|
|
|
try:
|
|
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
|
|
|
config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
|
|
|
|
except KeyError:
|
|
|
|
e = sys.exc_info()[1]
|
|
|
|
key, = e.args
|
|
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
|
|
|
|
2018-11-03 08:22:03 +08:00
|
|
|
import lit.llvm
|
|
|
|
lit.llvm.initialize(lit_config, config)
|
2017-12-13 00:54:20 +08:00
|
|
|
|
|
|
|
# Let the main config do the real work.
|
2021-02-11 23:41:32 +08:00
|
|
|
lit_config.load_config(config, "@CROSS_PROJECT_TESTS_SOURCE_DIR@/lit.cfg.py")
|