2018-04-19 01:08:49 +08:00
|
|
|
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
|
2019-01-10 00:25:37 +08:00
|
|
|
config.test_exec_root = "@LLDB_BINARY_DIR@"
|
2018-04-19 01:08:49 +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@"
|
2019-02-27 03:46:29 +08:00
|
|
|
config.llvm_shlib_dir = "@SHLIBDIR@"
|
2018-04-19 01:08:49 +08:00
|
|
|
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
|
|
|
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
|
|
|
config.lldb_obj_root = "@LLDB_BINARY_DIR@"
|
|
|
|
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
|
2020-01-31 16:35:34 +08:00
|
|
|
config.lldb_libs_dir = "@LLDB_LIBS_DIR@"
|
2020-08-29 09:15:28 +08:00
|
|
|
config.lldb_framework_dir = "@LLDB_FRAMEWORK_DIR@"
|
2018-08-21 06:00:31 +08:00
|
|
|
config.cmake_cxx_compiler = "@CMAKE_CXX_COMPILER@"
|
|
|
|
config.host_os = "@HOST_OS@"
|
|
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
2019-08-31 07:16:02 +08:00
|
|
|
config.shared_libs = @LLVM_ENABLE_SHARED_LIBS@
|
2018-08-21 06:00:31 +08:00
|
|
|
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
|
2018-04-19 01:08:49 +08:00
|
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
2019-08-30 02:37:05 +08:00
|
|
|
config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
|
2020-09-30 08:22:16 +08:00
|
|
|
config.lldb_trace_directory = "@LLDB_TEST_TRACE_DIRECTORY@"
|
2020-06-12 10:29:26 +08:00
|
|
|
config.lldb_reproducer_directory = os.path.join("@LLDB_TEST_BUILD_DIRECTORY@", "reproducers")
|
2020-08-17 23:47:52 +08:00
|
|
|
config.python_executable = "@Python3_EXECUTABLE@"
|
2018-05-04 00:54:10 +08:00
|
|
|
config.dotest_args_str = "@LLDB_DOTEST_ARGS@"
|
2019-12-14 02:37:33 +08:00
|
|
|
config.lldb_enable_python = @LLDB_ENABLE_PYTHON@
|
2018-07-05 01:14:52 +08:00
|
|
|
config.dotest_lit_args_str = None
|
2020-04-04 10:42:58 +08:00
|
|
|
config.enabled_plugins = []
|
2020-01-11 06:38:19 +08:00
|
|
|
config.lldb_executable = '@LLDB_TEST_EXECUTABLE@'
|
|
|
|
config.test_arch = '@LLDB_TEST_ARCH@'
|
|
|
|
config.test_compiler = '@LLDB_TEST_COMPILER@'
|
|
|
|
config.dsymutil = '@LLDB_TEST_DSYMUTIL@'
|
|
|
|
config.filecheck = '@LLDB_TEST_FILECHECK@'
|
2020-07-11 12:14:06 +08:00
|
|
|
config.yaml2obj = '@LLDB_TEST_YAML2OBJ@'
|
2020-09-30 04:26:09 +08:00
|
|
|
config.server = '@LLDB_TEST_SERVER@'
|
2019-10-11 01:27:09 +08:00
|
|
|
# The API tests use their own module caches.
|
|
|
|
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api")
|
|
|
|
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api")
|
2018-05-30 00:49:07 +08:00
|
|
|
|
2020-04-04 10:42:58 +08:00
|
|
|
# Plugins
|
|
|
|
lldb_build_intel_pt = '@LLDB_BUILD_INTEL_PT@'
|
|
|
|
if lldb_build_intel_pt == '1':
|
|
|
|
config.enabled_plugins.append('intel-pt')
|
|
|
|
|
2018-05-30 00:49:07 +08:00
|
|
|
# Additional dotest arguments can be passed to lit by providing a
|
|
|
|
# semicolon-separates list: --param dotest-args="arg;arg".
|
|
|
|
dotest_lit_args_str = lit_config.params.get('dotest-args', None)
|
|
|
|
if dotest_lit_args_str:
|
2018-07-05 01:14:52 +08:00
|
|
|
config.dotest_lit_args_str = dotest_lit_args_str
|
2018-05-30 00:49:07 +08:00
|
|
|
|
2018-04-19 01:08:49 +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:
|
|
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
|
|
|
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
|
2020-01-17 14:23:52 +08:00
|
|
|
config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
|
2018-04-19 01:08:49 +08:00
|
|
|
config.llvm_build_mode = config.llvm_build_mode % lit_config.params
|
2020-01-17 14:23:52 +08:00
|
|
|
config.lldb_executable = config.lldb_executable % lit_config.params
|
2020-02-07 02:27:10 +08:00
|
|
|
config.lldb_libs_dir = config.lldb_libs_dir % lit_config.params
|
|
|
|
config.test_compiler = config.test_compiler % lit_config.params
|
|
|
|
config.dsymutil = config.dsymutil % lit_config.params
|
|
|
|
config.filecheck = config.filecheck % lit_config.params
|
2020-09-11 01:09:35 +08:00
|
|
|
config.yaml2obj = config.yaml2obj % lit_config.params
|
2020-09-30 04:26:09 +08:00
|
|
|
config.server = config.server % lit_config.params
|
2020-09-30 00:12:29 +08:00
|
|
|
config.lldb_framework_dir = config.lldb_framework_dir % lit_config.params
|
2020-01-17 14:23:52 +08:00
|
|
|
config.dotest_args_str = config.dotest_args_str % lit_config.params
|
2018-04-19 01:08:49 +08:00
|
|
|
except KeyError as e:
|
|
|
|
key, = e.args
|
|
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
|
|
|
|
|
|
|
# Let the main config do the real work.
|
2020-09-30 14:00:18 +08:00
|
|
|
lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "API", "lit.cfg.py"))
|