llvm-project
39 строк · 1.7 Кб
1@LIT_SITE_CFG_IN_HEADER@
2
3import sys
4
5config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
6config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))
7config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
8config.target_triple = "@LLVM_TARGET_TRIPLE@"
9config.llvm_target_triple_env = "@LLVM_TARGET_TRIPLE_ENV@"
10config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
11config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
12config.flang_obj_root = "@FLANG_BINARY_DIR@"
13config.flang_src_dir = "@FLANG_SOURCE_DIR@"
14config.flang_tools_dir = lit_config.substitute("@FLANG_TOOLS_DIR@")
15config.flang_intrinsic_modules_dir = "@FLANG_INTRINSIC_MODULES_DIR@"
16config.flang_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
17config.flang_lib_dir = "@CMAKE_BINARY_DIR@/lib"
18config.flang_test_triple = "@FLANG_TEST_TARGET_TRIPLE@"
19config.flang_examples = @LLVM_BUILD_EXAMPLES@
20config.python_executable = "@PYTHON_EXECUTABLE@"
21config.flang_standalone_build = @FLANG_STANDALONE_BUILD@
22config.has_plugins = @LLVM_ENABLE_PLUGINS@
23config.linked_bye_extension = @LLVM_BYE_LINK_INTO_TOOLS@
24config.cc = "@CMAKE_C_COMPILER@"
25config.osx_sysroot = path(r"@CMAKE_OSX_SYSROOT@")
26config.targets_to_build = "@TARGETS_TO_BUILD@"
27config.default_sysroot = "@DEFAULT_SYSROOT@"
28config.have_openmp_rtl = ("@LLVM_TOOL_OPENMP_BUILD@" == "TRUE") or ("openmp" in "@LLVM_ENABLE_RUNTIMES@".lower().split(";"))
29if "openmp" in "@LLVM_ENABLE_RUNTIMES@".lower().split(";"):
30config.openmp_module_dir = "@CMAKE_BINARY_DIR@/runtimes/runtimes-bins/openmp/runtime/src"
31else:
32config.openmp_module_dir = None
33config.flang_runtime_f128_math_lib = "@FLANG_RUNTIME_F128_MATH_LIB@"
34
35import lit.llvm
36lit.llvm.initialize(lit_config, config)
37
38# Let the main config do the real work.
39lit_config.load_config(config, "@FLANG_SOURCE_DIR@/test/lit.cfg.py")
40