1@LIT_SITE_CFG_IN_HEADER@ 2 3config.llvm_src_root = "@LLVM_SOURCE_DIR@" 4config.llvm_obj_root = "@LLVM_BINARY_DIR@" 5config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" 6config.llvm_libs_dir = "@LLVM_LIBS_DIR@" 7config.llvm_shlib_dir = "@SHLIBDIR@" 8config.llvm_build_mode = "@LLVM_BUILD_MODE@" 9config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" 10config.lldb_obj_root = "@LLDB_BINARY_DIR@" 11config.lldb_src_root = "@LLDB_SOURCE_DIR@" 12config.lldb_libs_dir = "@LLDB_LIBS_DIR@" 13config.lldb_framework_dir = "@LLDB_FRAMEWORK_DIR@" 14config.cmake_cxx_compiler = "@CMAKE_CXX_COMPILER@" 15config.host_os = "@HOST_OS@" 16config.host_triple = "@LLVM_HOST_TRIPLE@" 17config.shared_libs = @LLVM_ENABLE_SHARED_LIBS@ 18config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" 19config.target_triple = "@TARGET_TRIPLE@" 20config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@" 21config.python_executable = "@Python3_EXECUTABLE@" 22config.lua_executable = "@Lua_EXECUTABLE@" 23config.lua_test_entry = "TestLuaAPI.py" 24config.dotest_args_str = "@LLDB_DOTEST_ARGS@" 25config.lldb_enable_python = @LLDB_ENABLE_PYTHON@ 26config.dotest_lit_args_str = None 27config.enabled_plugins = [] 28config.lldb_executable = '@LLDB_TEST_EXECUTABLE@' 29config.test_arch = '@LLDB_TEST_ARCH@' 30config.test_compiler = '@LLDB_TEST_COMPILER@' 31config.dsymutil = '@LLDB_TEST_DSYMUTIL@' 32# The API tests use their own module caches. 33config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api") 34config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api") 35 36# Plugins 37lldb_build_intel_pt = '@LLDB_BUILD_INTEL_PT@' 38if lldb_build_intel_pt == '1': 39 config.enabled_plugins.append('intel-pt') 40 41# Additional dotest arguments can be passed to lit by providing a 42# semicolon-separates list: --param dotest-args="arg;arg". 43dotest_lit_args_str = lit_config.params.get('dotest-args', None) 44if dotest_lit_args_str: 45 config.dotest_lit_args_str = dotest_lit_args_str 46 47# Support substitution of the tools and libs dirs with user parameters. This is 48# used when we can't determine the tool dir at configuration time. 49try: 50 config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params 51 config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params 52 config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params 53 config.llvm_build_mode = config.llvm_build_mode % lit_config.params 54 config.lldb_executable = config.lldb_executable % lit_config.params 55 config.lldb_libs_dir = config.lldb_libs_dir % lit_config.params 56 config.test_compiler = config.test_compiler % lit_config.params 57 config.dsymutil = config.dsymutil % lit_config.params 58 config.lldb_framework_dir = config.lldb_framework_dir % lit_config.params 59 config.dotest_args_str = config.dotest_args_str % lit_config.params 60except KeyError as e: 61 key, = e.args 62 lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) 63 64# Let the main config do the real work. 65lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "API", "lit.cfg.py")) 66