• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@LIT_SITE_CFG_IN_HEADER@
2
3import sys
4
5config.llvm_src_root = "@LLVM_SOURCE_DIR@"
6config.llvm_obj_root = "@LLVM_BINARY_DIR@"
7config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
8config.llvm_build_mode = "@LLVM_BUILD_MODE@"
9config.enable_shared = @ENABLE_SHARED@
10config.shlibdir = "@SHLIBDIR@"
11
12# Support substitution of the tools_dir and build_mode with user parameters.
13# This is used when we can't determine the tool dir at configuration time.
14try:
15    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
16    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
17except KeyError:
18    e = sys.exc_info()[1]
19    key, = e.args
20    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
21
22# Let the main config do the real work.
23lit_config.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg.py")
24