• 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_libs_dir = "@LLVM_LIBS_DIR@"
9config.llvm_build_mode = "@LLVM_BUILD_MODE@"
10config.polly_obj_root = "@POLLY_BINARY_DIR@"
11config.polly_lib_dir = "@POLLY_LIB_DIR@"
12config.enable_shared = @ENABLE_SHARED@
13config.shlibdir = "@SHLIBDIR@"
14config.target_triple = "@TARGET_TRIPLE@"
15config.enable_gpgpu_codegen = "@GPU_CODEGEN@"
16config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
17config.has_unittests = @POLLY_GTEST_AVAIL@
18
19# Support substitution of the tools_dir, libs_dirs, and build_mode with user
20# parameters. This is used when we can't determine the tool dir at
21# configuration time.
22try:
23    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
24    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
25    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
26except KeyError:
27    e = sys.exc_info()[1]
28    key, = e.args
29    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
30
31# Let the main config do the real work.
32lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/Unit/lit.cfg")
33