xref: /aosp_15_r20/external/llvm/test/lit.site.cfg.in (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@LIT_SITE_CFG_IN_HEADER@
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerimport sys
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerconfig.host_triple = "@LLVM_HOST_TRIPLE@"
6*9880d681SAndroid Build Coastguard Workerconfig.target_triple = "@TARGET_TRIPLE@"
7*9880d681SAndroid Build Coastguard Workerconfig.llvm_src_root = "@LLVM_SOURCE_DIR@"
8*9880d681SAndroid Build Coastguard Workerconfig.llvm_obj_root = "@LLVM_BINARY_DIR@"
9*9880d681SAndroid Build Coastguard Workerconfig.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
10*9880d681SAndroid Build Coastguard Workerconfig.llvm_lib_dir = "@LLVM_LIBRARY_DIR@"
11*9880d681SAndroid Build Coastguard Workerconfig.llvm_shlib_dir = "@SHLIBDIR@"
12*9880d681SAndroid Build Coastguard Workerconfig.llvm_shlib_ext = "@SHLIBEXT@"
13*9880d681SAndroid Build Coastguard Workerconfig.llvm_exe_ext = "@EXEEXT@"
14*9880d681SAndroid Build Coastguard Workerconfig.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
15*9880d681SAndroid Build Coastguard Workerconfig.python_executable = "@PYTHON_EXECUTABLE@"
16*9880d681SAndroid Build Coastguard Workerconfig.gold_executable = "@GOLD_EXECUTABLE@"
17*9880d681SAndroid Build Coastguard Workerconfig.ld64_executable = "@LD64_EXECUTABLE@"
18*9880d681SAndroid Build Coastguard Workerconfig.ocamlfind_executable = "@OCAMLFIND@"
19*9880d681SAndroid Build Coastguard Workerconfig.have_ocamlopt = "@HAVE_OCAMLOPT@"
20*9880d681SAndroid Build Coastguard Workerconfig.have_ocaml_ounit = "@HAVE_OCAML_OUNIT@"
21*9880d681SAndroid Build Coastguard Workerconfig.ocaml_flags = "@OCAMLFLAGS@"
22*9880d681SAndroid Build Coastguard Workerconfig.include_go_tests = "@LLVM_INCLUDE_GO_TESTS@"
23*9880d681SAndroid Build Coastguard Workerconfig.go_executable = "@GO_EXECUTABLE@"
24*9880d681SAndroid Build Coastguard Workerconfig.enable_shared = @ENABLE_SHARED@
25*9880d681SAndroid Build Coastguard Workerconfig.enable_assertions = @ENABLE_ASSERTIONS@
26*9880d681SAndroid Build Coastguard Workerconfig.targets_to_build = "@TARGETS_TO_BUILD@"
27*9880d681SAndroid Build Coastguard Workerconfig.native_target = "@LLVM_NATIVE_ARCH@"
28*9880d681SAndroid Build Coastguard Workerconfig.llvm_bindings = "@LLVM_BINDINGS@".split(' ')
29*9880d681SAndroid Build Coastguard Workerconfig.host_os = "@HOST_OS@"
30*9880d681SAndroid Build Coastguard Workerconfig.host_arch = "@HOST_ARCH@"
31*9880d681SAndroid Build Coastguard Workerconfig.host_cc = "@HOST_CC@"
32*9880d681SAndroid Build Coastguard Workerconfig.host_cxx = "@HOST_CXX@"
33*9880d681SAndroid Build Coastguard Workerconfig.host_ldflags = "@HOST_LDFLAGS@"
34*9880d681SAndroid Build Coastguard Workerconfig.llvm_use_intel_jitevents = "@LLVM_USE_INTEL_JITEVENTS@"
35*9880d681SAndroid Build Coastguard Workerconfig.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
36*9880d681SAndroid Build Coastguard Workerconfig.have_zlib = "@HAVE_LIBZ@"
37*9880d681SAndroid Build Coastguard Workerconfig.have_libxar = "@HAVE_LIBXAR@"
38*9880d681SAndroid Build Coastguard Workerconfig.have_dia_sdk = @HAVE_DIA_SDK@
39*9880d681SAndroid Build Coastguard Workerconfig.enable_ffi = "@LLVM_ENABLE_FFI@"
40*9880d681SAndroid Build Coastguard Workerconfig.test_examples = "@ENABLE_EXAMPLES@"
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker# Support substitution of the tools_dir with user parameters. This is
43*9880d681SAndroid Build Coastguard Worker# used when we can't determine the tool dir at configuration time.
44*9880d681SAndroid Build Coastguard Workertry:
45*9880d681SAndroid Build Coastguard Worker    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
46*9880d681SAndroid Build Coastguard Worker    config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
47*9880d681SAndroid Build Coastguard Workerexcept KeyError:
48*9880d681SAndroid Build Coastguard Worker    e = sys.exc_info()[1]
49*9880d681SAndroid Build Coastguard Worker    key, = e.args
50*9880d681SAndroid Build Coastguard Worker    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
51*9880d681SAndroid Build Coastguard Worker
52*9880d681SAndroid Build Coastguard Worker# Let the main config do the real work.
53*9880d681SAndroid Build Coastguard Workerlit_config.load_config(config, "@LLVM_SOURCE_DIR@/test/lit.cfg")
54