aboutsummaryrefslogtreecommitdiff
path: root/clang/utils/perf-training/lit.site.cfg.in
blob: 340a0e909b10963d58f9ec780773a201f1bc4a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@LIT_SITE_CFG_IN_HEADER@

import sys

config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
config.target_triple = "@TARGET_TRIPLE@"
config.python_exe = "@PYTHON_EXECUTABLE@"

# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
try:
    config.clang_tools_dir = config.clang_tools_dir % lit_config.params
except KeyError:
    e = sys.exc_info()[1]
    key, = e.args
    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))

# Let the main config do the real work.
lit_config.load_config(config, "@CLANG_SOURCE_DIR@/utils/perf-training/lit.cfg")