| 1 |
@LIT_SITE_CFG_IN_HEADER@ |
| 2 |
|
| 3 |
import sys |
| 4 |
|
| 5 |
config.llvm_src_root = "@LLVM_SOURCE_DIR@" |
| 6 |
config.llvm_obj_root = "@LLVM_BINARY_DIR@" |
| 7 |
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
| 8 |
config.llvm_spirv_dir = "@LLVM_SPIRV_DIR@" |
| 9 |
config.llvm_libs_dir = "@LLVM_LIBS_DIR@" |
| 10 |
config.llvm_shlib_dir = "@SHLIBDIR@" |
| 11 |
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@" |
| 12 |
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" |
| 13 |
config.host_triple = "@LLVM_HOST_TRIPLE@" |
| 14 |
config.target_triple = "@LLVM_TARGET_TRIPLE@" |
| 15 |
config.host_arch = "@HOST_ARCH@" |
| 16 |
config.python_executable = "@PYTHON_EXECUTABLE@" |
| 17 |
config.test_run_dir = "@CMAKE_CURRENT_BINARY_DIR@" |
| 18 |
config.spirv_tools_found = "@SPIRV_TOOLS_FOUND@" |
| 19 |
config.spirv_tools_have_spirv_as = @SPIRV_TOOLS_SPIRV_AS_FOUND@ |
| 20 |
config.spirv_tools_have_spirv_link = @SPIRV_TOOLS_SPIRV_LINK_FOUND@ |
| 21 |
config.spirv_tools_have_spirv_val = @SPIRV_TOOLS_SPIRV_VAL_FOUND@ |
| 22 |
config.spirv_tools_bin_dir = "@SPIRV_TOOLS_BINDIR@" |
| 23 |
config.spirv_tools_lib_dir = "@SPIRV_TOOLS_LIBDIR@" |
| 24 |
config.spirv_skip_debug_info_tests = @SPIRV_SKIP_DEBUG_INFO_TESTS@ |
| 25 |
|
| 26 |
# Support substitution of the tools and libs dirs with user parameters. This is |
| 27 |
# used when we can't determine the tool dir at configuration time. |
| 28 |
try: |
| 29 |
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params |
| 30 |
config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params |
| 31 |
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params |
| 32 |
except KeyError: |
| 33 |
e = sys.exc_info()[1] |
| 34 |
key, = e.args |
| 35 |
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key)) |
| 36 |
|
| 37 |
import lit.llvm |
| 38 |
lit.llvm.initialize(lit_config, config) |
| 39 |
|
| 40 |
# Let the main config do the real work. |
| 41 |
lit_config.load_config(config, "@LLVM_SPIRV_TEST_SOURCE_DIR@/lit.cfg.py") |