xref: /aosp_15_r20/external/compiler-rt/unittests/lit.common.unit.configured.in (revision 7c3d14c8b49c529e04be81a3ce6f5cc23712e4c6)
1*7c3d14c8STreehugger Robot@LIT_SITE_CFG_IN_HEADER@
2*7c3d14c8STreehugger Robot
3*7c3d14c8STreehugger Robot# Generic config options for all compiler-rt unit tests.
4*7c3d14c8STreehugger Robotconfig.target_triple = "@TARGET_TRIPLE@"
5*7c3d14c8STreehugger Robotconfig.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
6*7c3d14c8STreehugger Robotconfig.llvm_obj_root = "@LLVM_BINARY_DIR@"
7*7c3d14c8STreehugger Robotconfig.llvm_tools_dir = "@LLVM_TOOLS_BINARY_DIR@"
8*7c3d14c8STreehugger Robotconfig.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
9*7c3d14c8STreehugger Robotconfig.compiler_rt_libdir = "@COMPILER_RT_LIBRARY_OUTPUT_DIR@"
10*7c3d14c8STreehugger Robotconfig.llvm_build_mode = "@LLVM_BUILD_MODE@"
11*7c3d14c8STreehugger Robotconfig.host_arch = "@HOST_ARCH@"
12*7c3d14c8STreehugger Robotconfig.host_os = "@HOST_OS@"
13*7c3d14c8STreehugger Robot
14*7c3d14c8STreehugger Robot# LLVM tools dir and build mode can be passed in lit parameters,
15*7c3d14c8STreehugger Robot# so try to apply substitution.
16*7c3d14c8STreehugger Robottry:
17*7c3d14c8STreehugger Robot  config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
18*7c3d14c8STreehugger Robot  config.llvm_build_mode = config.llvm_build_mode % lit_config.params
19*7c3d14c8STreehugger Robotexcept KeyError as e:
20*7c3d14c8STreehugger Robot  key, = e.args
21*7c3d14c8STreehugger Robot  lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
22*7c3d14c8STreehugger Robot
23*7c3d14c8STreehugger Robot# Setup attributes common for all compiler-rt unit tests.
24*7c3d14c8STreehugger Robotlit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/unittests/lit.common.unit.cfg")
25