This mechanically applies the same changes from D121427 everywhere.
Differential Revision: https://reviews.llvm.org/D121746
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.bolt_obj_root = "@BOLT_BINARY_DIR@"
config.bolt_src_root = "@BOLT_SOURCE_DIR@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
-# 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.bolt_obj_root = "@BOLT_BINARY_DIR@"
config.bolt_enable_runtime = @BOLT_ENABLE_RUNTIME@
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.bolt_clang = "@BOLT_CLANG_EXE@"
config.bolt_lld = "@BOLT_LLD_EXE@"
-# 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_shlib_dir = config.llvm_shlib_dir % lit_config.params
- config.llvm_libs_dir = config.llvm_libs_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))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
-config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
-config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@")
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute(path(r"@LLVM_TOOLS_DIR@"))
+config.llvm_libs_dir = lit_config.substitute(path(r"@LLVM_LIBS_DIR@"))
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.clang_obj_root = path(r"@CLANG_BINARY_DIR@")
config.enable_shared = @ENABLE_SHARED@
-config.shlibdir = path(r"@SHLIBDIR@")
+config.shlibdir = lit_config.substitute(path(r"@SHLIBDIR@"))
config.target_triple = "@LLVM_TARGET_TRIPLE@"
-# Support substitution of the tools_dir, libs_dirs, and build_mode 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
- config.shlibdir = config.shlibdir % 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))
-
# Let the main config do the real work.
lit_config.load_config(
config, os.path.join(path(r"@CLANG_SOURCE_DIR@"), "test/Unit/lit.cfg.py"))
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
-config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
-config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@")
-config.llvm_shlib_dir = path(r"@SHLIBDIR@")
+config.llvm_tools_dir = lit_config.substitute(path(r"@LLVM_TOOLS_DIR@"))
+config.llvm_libs_dir = lit_config.substitute(path(r"@LLVM_LIBS_DIR@"))
+config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@")
config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
config.clang_lit_site_cfg = __file__
config.clang_obj_root = path(r"@CLANG_BINARY_DIR@")
config.clang_src_dir = path(r"@CLANG_SOURCE_DIR@")
-config.clang_tools_dir = path(r"@CLANG_TOOLS_DIR@")
+config.clang_tools_dir = lit_config.substitute(path(r"@CLANG_TOOLS_DIR@"))
config.clang_lib_dir = path(r"@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.clang_vendor_uti = "@CLANG_VENDOR_UTI@"
config.llvm_external_lit = path(r"@LLVM_EXTERNAL_LIT@")
-# 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.clang_tools_dir = config.clang_tools_dir % lit_config.params
- config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
- config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
- config.llvm_libs_dir = config.llvm_libs_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))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
import sys
-config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
+config.clang_tools_dir = lit_config.substitute("@CLANG_TOOLS_DIR@")
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_exe = "@Python3_EXECUTABLE@"
-# 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.clang_tools_dir = config.clang_tools_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))
-
# Let the main config do the real work.
lit_config.load_config(config, "@CLANG_SOURCE_DIR@/utils/perf-training/lit.cfg")
import sys
-config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
+config.clang_tools_dir = lit_config.substitute("@CLANG_TOOLS_DIR@")
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_exe = "@Python3_EXECUTABLE@"
-# 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.clang_tools_dir = config.clang_tools_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))
-
# Let the main config do the real work.
lit_config.load_config(config, "@CLANG_SOURCE_DIR@/utils/perf-training/order-files.lit.cfg")
# LLVM tools dir can be passed in lit parameters, so try to
# apply substitution.
-try:
- config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
- config.clang = config.clang % lit_config.params
- config.compiler_rt_libdir = config.compiler_rt_libdir % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
+config.llvm_tools_dir = lit_config.substitute(config.llvm_tools_dir)
+config.clang = lit_config.substitute(config.clang)
+config.compiler_rt_libdir = lit_config.substitute(config.compiler_rt_libdir)
if not os.path.exists(config.clang):
lit_config.fatal("Can't find compiler on path %r" % config.clang)
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.compiler_rt_libdir = "@COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR@"
+config.compiler_rt_libdir = lit_config.substitute("@COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR@")
config.enable_per_target_runtime_dir = @LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_PYBOOL@
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.host_arch = "@HOST_ARCH@"
config.host_os = "@HOST_OS@"
config.llvm_lib_dir = "@LLVM_LIBRARY_DIR@"
config.gwp_asan = @COMPILER_RT_HAS_GWP_ASAN_PYBOOL@
config.emulator = "@COMPILER_RT_EMULATOR@"
-# LLVM tools dir and build mode can be passed in lit parameters,
-# so try to apply substitution.
-try:
- config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
- config.compiler_rt_libdir = config.compiler_rt_libdir % lit_config.params
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
-
# Setup attributes common for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/unittests/lit.common.unit.cfg.py")
config.targets_to_build = "@TARGETS_TO_BUILD@".split()
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.cross_project_tests_obj_root = "@CROSS_PROJECT_TESTS_BINARY_DIR@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
-# 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))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.flang_obj_root = "@FLANG_BINARY_DIR@"
config.flang_src_root = "@FLANG_SOURCE_DIR@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
-# 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-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.
lit_config.load_config(config, "@FLANG_SOURCE_DIR@/test/NonGtestUnit/lit.cfg.py")
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.flang_obj_root = "@FLANG_BINARY_DIR@"
config.flang_src_root = "@FLANG_SOURCE_DIR@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
-# 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-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.
lit_config.load_config(config, "@FLANG_SOURCE_DIR@/test/Unit/lit.cfg.py")
import sys
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_shlib_dir = path(r"@SHLIBDIR@")
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
config.flang_obj_root = "@FLANG_BINARY_DIR@"
config.flang_src_dir = "@FLANG_SOURCE_DIR@"
-config.flang_tools_dir = "@FLANG_TOOLS_DIR@"
+config.flang_tools_dir = lit_config.substitute("@FLANG_TOOLS_DIR@")
config.flang_intrinsic_modules_dir = "@FLANG_INTRINSIC_MODULES_DIR@"
config.flang_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
config.flang_lib_dir = "@CMAKE_BINARY_DIR@/lib"
config.cc = "@CMAKE_C_COMPILER@"
config.targets_to_build = "@TARGETS_TO_BUILD@"
-# 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.flang_tools_dir = config.flang_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))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lld_obj_root = "@LLD_BINARY_DIR@"
config.lld_src_root = "@LLD_SOURCE_DIR@"
-config.lld_libs_dir = "@LLD_LIBS_DIR@"
-config.lld_tools_dir = "@LLD_TOOLS_DIR@"
+config.lld_libs_dir = lit_config.substitute("@LLD_LIBS_DIR@")
+config.lld_tools_dir = lit_config.substitute("@LLD_TOOLS_DIR@")
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
-# 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
- config.lld_libs_dir = config.lld_libs_dir % lit_config.params
- config.lld_tools_dir = config.lld_tools_dir % lit_config.params
-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.
lit_config.load_config(config, "@LLD_SOURCE_DIR@/test/Unit/lit.cfg.py")
config.have_dia_sdk = lit.util.pythonize_bool("@LLVM_ENABLE_DIA_SDK@")
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.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
config.lld_obj_root = "@LLD_BINARY_DIR@"
-config.lld_libs_dir = "@LLD_LIBS_DIR@"
-config.lld_tools_dir = "@LLD_TOOLS_DIR@"
+config.lld_libs_dir = lit_config.substitute("@LLD_LIBS_DIR@")
+config.lld_tools_dir = lit_config.substitute("@LLD_TOOLS_DIR@")
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.have_zlib = @LLVM_ENABLE_ZLIB@
config.sizeof_void_p = @CMAKE_SIZEOF_VOID_P@
config.ld_lld_default_mingw = @LLD_DEFAULT_LD_LLD_IS_MINGW@
-# 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
- config.lld_libs_dir = config.lld_libs_dir % lit_config.params
- config.lld_tools_dir = config.lld_tools_dir % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
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.llvm_shlib_dir = "@SHLIBDIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
+config.llvm_build_mode = lit_config.substitute("@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@"
-config.lldb_libs_dir = "@LLDB_LIBS_DIR@"
-config.lldb_framework_dir = "@LLDB_FRAMEWORK_DIR@"
+config.lldb_libs_dir = lit_config.substitute("@LLDB_LIBS_DIR@")
+config.lldb_framework_dir = lit_config.substitute("@LLDB_FRAMEWORK_DIR@")
config.cmake_cxx_compiler = "@CMAKE_CXX_COMPILER@"
config.host_os = "@HOST_OS@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.lua_executable = "@Lua_EXECUTABLE@"
config.lua_test_entry = "TestLuaAPI.py"
-config.dotest_args_str = "@LLDB_DOTEST_ARGS@"
+config.dotest_args_str = lit_config.substitute("@LLDB_DOTEST_ARGS@")
config.lldb_enable_python = @LLDB_ENABLE_PYTHON@
config.dotest_lit_args_str = None
config.enabled_plugins = []
-config.lldb_executable = '@LLDB_TEST_EXECUTABLE@'
+config.lldb_executable = lit_config.substitute('@LLDB_TEST_EXECUTABLE@')
config.test_arch = '@LLDB_TEST_ARCH@'
-config.test_compiler = '@LLDB_TEST_COMPILER@'
-config.dsymutil = '@LLDB_TEST_DSYMUTIL@'
+config.test_compiler = lit_config.substitute('@LLDB_TEST_COMPILER@')
+config.dsymutil = lit_config.substitute('@LLDB_TEST_DSYMUTIL@')
# 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")
if dotest_lit_args_str:
config.dotest_lit_args_str = dotest_lit_args_str
-# 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
- config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
- config.lldb_executable = config.lldb_executable % lit_config.params
- 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.lldb_framework_dir = config.lldb_framework_dir % lit_config.params
- config.dotest_args_str = config.dotest_args_str % lit_config.params
-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.
lit_config.load_config(config, os.path.join(config.lldb_src_root, "test", "API", "lit.cfg.py"))
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.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.lldb_src_root = "@LLDB_SOURCE_DIR@"
config.lldb_obj_root = "@LLDB_BINARY_DIR@"
-config.lldb_libs_dir = "@LLDB_LIBS_DIR@"
-config.lldb_tools_dir = "@LLDB_TOOLS_DIR@"
+config.lldb_libs_dir = lit_config.substitute("@LLDB_LIBS_DIR@")
+config.lldb_tools_dir = lit_config.substitute("@LLDB_TOOLS_DIR@")
# Since it comes from the command line, it may have backslashes which
# should not need to be escaped.
-config.lldb_lit_tools_dir = r"@LLDB_LIT_TOOLS_DIR@"
+config.lldb_lit_tools_dir = lit_config.substitute(r"@LLDB_LIT_TOOLS_DIR@")
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
config.have_zlib = @LLVM_ENABLE_ZLIB@
config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")
-# 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
- config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
- config.lldb_libs_dir = config.lldb_libs_dir % lit_config.params
- config.lldb_tools_dir = config.lldb_tools_dir % lit_config.params
- config.lldb_lit_tools_dir = config.lldb_lit_tools_dir % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@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@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
-# 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@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@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.python_executable = "@Python3_EXECUTABLE@"
-# 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
- config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
-config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute(path(r"@LLVM_TOOLS_DIR@"))
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.enable_shared = @ENABLE_SHARED@
-config.shlibdir = path(r"@SHLIBDIR@")
-
-# Support substitution of the tools_dir and build_mode 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_build_mode = config.llvm_build_mode % lit_config.params
- config.shlibdir = config.shlibdir % 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))
+config.shlibdir = lit_config.substitute(path(r"@SHLIBDIR@"))
# Let the main config do the real work.
lit_config.load_config(
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
-config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
-config.llvm_lib_dir = path(r"@LLVM_LIBS_DIR@")
-config.llvm_shlib_dir = path(r"@SHLIBDIR@")
+config.llvm_tools_dir = lit_config.substitute(path(r"@LLVM_TOOLS_DIR@"))
+config.llvm_lib_dir = lit_config.substitute(path(r"@LLVM_LIBS_DIR@"))
+config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
config.llvm_shlib_ext = "@SHLIBEXT@"
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.llvm_exe_ext = "@EXEEXT@"
config.llvm_raevict_model_autogenerated = @LLVM_RAEVICT_MODEL_AUTOGENERATED@
config.expensive_checks = @LLVM_ENABLE_EXPENSIVE_CHECKS@
-# 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_lib_dir = config.llvm_lib_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))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-
-# 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
-except KeyError:
- e = sys.exc_info()[1]
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_lib_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_lib_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
config.llvm_shlib_ext = "@SHLIBEXT@"
config.llvm_exe_ext = "@EXEEXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.standalone_src_root = "@CMAKE_SOURCE_DIR@"
config.standalone_obj_root = "@CMAKE_BINARY_DIR@"
-# 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_lib_dir = config.llvm_lib_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))
-
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.enable_shared = @ENABLE_SHARED@
-config.shlibdir = "@SHLIBDIR@"
+config.shlibdir = lit_config.substitute("@SHLIBDIR@")
config.mlir_src_root = "@MLIR_SOURCE_DIR@"
config.mlir_obj_root = "@MLIR_BINARY_DIR@"
config.mlir_tools_dir = "@MLIR_TOOLS_DIR@"
-# Support substitution of the tools_dir and build_mode 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_build_mode = config.llvm_build_mode % lit_config.params
- config.shlibdir = config.shlibdir % 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))
-
# Let the main config do the real work.
lit_config.load_config(config, "@MLIR_SOURCE_DIR@/test/Unit/lit.cfg.py")
config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_lib_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_lib_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
config.llvm_shlib_ext = "@SHLIBEXT@"
config.llvm_exe_ext = "@EXEEXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.mlir_run_cuda_tensor_core_tests = @MLIR_RUN_CUDA_TENSOR_CORE_TESTS@
config.mlir_include_integration_tests = @MLIR_INCLUDE_INTEGRATION_TESTS@
-# 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_lib_dir = config.llvm_lib_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))
-
import lit.llvm
lit.llvm.initialize(lit_config, config)
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.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
+config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.polly_obj_root = "@POLLY_BINARY_DIR@"
config.polly_lib_dir = "@POLLY_LIB_DIR@"
config.enable_shared = @ENABLE_SHARED@
config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
config.has_unittests = @POLLY_GTEST_AVAIL@
-# Support substitution of the tools_dir, libs_dirs, and build_mode 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
- config.llvm_build_mode = config.llvm_build_mode % 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))
-
# Let the main config do the real work.
lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/Unit/lit.cfg")
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.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
+config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
config.polly_obj_root = "@POLLY_BINARY_DIR@"
config.polly_lib_dir = "@POLLY_LIB_DIR@"
config.target_triple = "@LLVM_TARGET_TRIPLE@"
for arch in config.targets_to_build.split():
config.available_features.add(arch.lower() + '-registered-target')
-# 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
-except KeyError:
- e = sys.exc_info()[1]
- key, = e.args
- lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
# subdirectories contain auxiliary inputs for various tests in their parent
# directories.