150
|
1 @LIT_SITE_CFG_IN_HEADER@
|
|
2
|
|
3 import sys
|
|
4
|
|
5 config.host_triple = "@LLVM_HOST_TRIPLE@"
|
|
6 config.target_triple = "@TARGET_TRIPLE@"
|
|
7 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
|
|
8 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|
9 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
207
|
10 config.llvm_lib_dir = "@LLVM_LIBS_DIR@"
|
150
|
11 config.llvm_shlib_dir = "@SHLIBDIR@"
|
|
12 config.llvm_shlib_ext = "@SHLIBEXT@"
|
|
13 config.llvm_exe_ext = "@EXEEXT@"
|
|
14 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
207
|
15 config.python_executable = "@Python3_EXECUTABLE@"
|
150
|
16 config.gold_executable = "@GOLD_EXECUTABLE@"
|
|
17 config.ld64_executable = "@LD64_EXECUTABLE@"
|
|
18 config.enable_shared = @ENABLE_SHARED@
|
|
19 config.enable_assertions = @ENABLE_ASSERTIONS@
|
|
20 config.targets_to_build = "@TARGETS_TO_BUILD@"
|
|
21 config.native_target = "@LLVM_NATIVE_ARCH@"
|
|
22 config.llvm_bindings = "@LLVM_BINDINGS@".split(' ')
|
|
23 config.host_os = "@HOST_OS@"
|
|
24 config.host_cc = "@HOST_CC@"
|
|
25 config.host_cxx = "@HOST_CXX@"
|
207
|
26 config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@"
|
173
|
27 config.host_cmake = "@CMAKE_COMMAND@"
|
150
|
28 # Note: ldflags can contain double-quoted paths, so must use single quotes here.
|
|
29 config.host_ldflags = '@HOST_LDFLAGS@'
|
|
30 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
|
|
31 config.llvm_host_triple = '@LLVM_HOST_TRIPLE@'
|
|
32 config.host_arch = "@HOST_ARCH@"
|
|
33 config.mlir_src_root = "@MLIR_SOURCE_DIR@"
|
|
34 config.mlir_obj_root = "@MLIR_BINARY_DIR@"
|
173
|
35 config.mlir_runner_utils_dir = "@MLIR_RUNNER_UTILS_DIR@"
|
150
|
36 config.mlir_tools_dir = "@MLIR_TOOLS_DIR@"
|
207
|
37 config.mlir_cmake_dir = "@MLIR_CMAKE_DIR@"
|
150
|
38 config.linalg_test_lib_dir = "@MLIR_DIALECT_LINALG_INTEGRATION_TEST_LIB_DIR@"
|
|
39 config.build_examples = @LLVM_BUILD_EXAMPLES@
|
207
|
40 config.run_cuda_tests = @MLIR_ENABLE_CUDA_CONVERSIONS@
|
|
41 config.enable_cuda_runner = @MLIR_ENABLE_CUDA_RUNNER@
|
|
42 config.run_rocm_tests = @MLIR_ENABLE_ROCM_CONVERSIONS@
|
|
43 config.enable_rocm_runner = @MLIR_ENABLE_ROCM_RUNNER@
|
|
44 config.spirv_wrapper_library_dir = "@MLIR_SPIRV_WRAPPER_LIBRARY_DIR@"
|
|
45 config.enable_spirv_cpu_runner = @MLIR_ENABLE_SPIRV_CPU_RUNNER@
|
173
|
46 config.vulkan_wrapper_library_dir = "@MLIR_VULKAN_WRAPPER_LIBRARY_DIR@"
|
207
|
47 config.enable_vulkan_runner = @MLIR_ENABLE_VULKAN_RUNNER@
|
|
48 config.enable_bindings_python = @MLIR_ENABLE_BINDINGS_PYTHON@
|
|
49 config.mlir_integration_test_dir = "@MLIR_INTEGRATION_TEST_DIR@"
|
|
50 config.intel_sde_executable = "@INTEL_SDE_EXECUTABLE@"
|
|
51 config.mlir_run_amx_tests = "@MLIR_RUN_AMX_TESTS@"
|
|
52 config.mlir_run_x86vector_tests = "@MLIR_RUN_X86VECTOR_TESTS@"
|
|
53 config.mlir_run_cuda_tensor_core_tests = "@MLIR_RUN_CUDA_TENSOR_CORE_TESTS@"
|
|
54 config.mlir_include_integration_tests = "@MLIR_INCLUDE_INTEGRATION_TESTS@"
|
150
|
55
|
|
56 # Support substitution of the tools_dir with user parameters. This is
|
|
57 # used when we can't determine the tool dir at configuration time.
|
|
58 try:
|
|
59 config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
207
|
60 config.llvm_lib_dir = config.llvm_lib_dir % lit_config.params
|
150
|
61 config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
|
|
62 except KeyError:
|
|
63 e = sys.exc_info()[1]
|
|
64 key, = e.args
|
|
65 lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
|
66
|
|
67 import lit.llvm
|
|
68 lit.llvm.initialize(lit_config, config)
|
|
69
|
|
70 # Let the main config do the real work.
|
|
71 lit_config.load_config(config, "@MLIR_SOURCE_DIR@/test/lit.cfg.py")
|