2016-04-16 15:03:45 +08:00
|
|
|
@LIT_SITE_CFG_IN_HEADER@
|
2013-06-06 20:48:20 +08:00
|
|
|
|
|
|
|
# Generic config options for all compiler-rt unit tests.
|
|
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
2016-02-02 05:08:16 +08:00
|
|
|
config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
|
2013-06-06 21:28:37 +08:00
|
|
|
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
2017-11-13 20:57:54 +08:00
|
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
2013-06-06 20:48:20 +08:00
|
|
|
config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
|
2017-11-13 20:57:54 +08:00
|
|
|
config.compiler_rt_libdir = "@COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR@"
|
2013-06-06 20:48:20 +08:00
|
|
|
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
|
2014-01-31 19:44:32 +08:00
|
|
|
config.host_arch = "@HOST_ARCH@"
|
2013-09-08 21:23:29 +08:00
|
|
|
config.host_os = "@HOST_OS@"
|
2018-09-28 07:15:05 +08:00
|
|
|
config.llvm_lib_dir = "@LLVM_LIBRARY_DIR@"
|
2019-12-14 01:09:34 +08:00
|
|
|
config.gwp_asan = @COMPILER_RT_HAS_GWP_ASAN_PYBOOL@
|
2021-04-23 02:16:21 +08:00
|
|
|
config.emulator = "@COMPILER_RT_EMULATOR@"
|
2013-06-06 20:48:20 +08:00
|
|
|
|
2013-06-06 21:28:37 +08:00
|
|
|
# LLVM tools dir and build mode can be passed in lit parameters,
|
|
|
|
# so try to apply substitution.
|
2013-06-06 20:48:20 +08:00
|
|
|
try:
|
2013-08-10 06:14:01 +08:00
|
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
2017-11-13 20:57:54 +08:00
|
|
|
config.compiler_rt_libdir = config.compiler_rt_libdir % lit_config.params
|
2013-08-10 06:14:01 +08:00
|
|
|
config.llvm_build_mode = config.llvm_build_mode % lit_config.params
|
2014-12-13 10:46:56 +08:00
|
|
|
except KeyError as e:
|
2013-06-06 20:48:20 +08:00
|
|
|
key, = e.args
|
2013-08-10 06:14:01 +08:00
|
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
|
2013-06-06 20:48:20 +08:00
|
|
|
|
|
|
|
# Setup attributes common for all compiler-rt unit tests.
|
2019-06-28 04:56:04 +08:00
|
|
|
lit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/unittests/lit.common.unit.cfg.py")
|