summaryrefslogtreecommitdiff
path: root/unittests/lit.common.unit.configured.in
blob: fafac19b75948cdccf370e048f2cced6dabe5d9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@LIT_SITE_CFG_IN_HEADER@

# Generic config options for all compiler-rt unit tests.
config.target_triple = "@TARGET_TRIPLE@"
config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
config.compiler_rt_libdir = "@COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR@"
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.host_arch = "@HOST_ARCH@"
config.host_os = "@HOST_OS@"

# LLVM tools dir and build mode can be passed in lit parameters,
# so try to apply substitution.
try:
  config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
  config.compiler_rt_libdir = config.compiler_rt_libdir % lit_config.params
  config.llvm_build_mode = config.llvm_build_mode % lit_config.params
except KeyError as e:
  key, = e.args
  lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))

# Setup attributes common for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/unittests/lit.common.unit.cfg")