annotate clang-tools-extra/test/lit.site.cfg.py.in @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 79ff65ed7e25
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 @LIT_SITE_CFG_IN_HEADER@
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 import sys
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
anatofuz
parents:
diff changeset
6 config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
anatofuz
parents:
diff changeset
7 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
anatofuz
parents:
diff changeset
8 config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
anatofuz
parents:
diff changeset
9 config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
anatofuz
parents:
diff changeset
10 config.clang_libs_dir = "@SHLIBDIR@"
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
11 config.python_executable = "@Python3_EXECUTABLE@"
150
anatofuz
parents:
diff changeset
12 config.target_triple = "@TARGET_TRIPLE@"
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 173
diff changeset
13 config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
150
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 # Support substitution of the tools and libs dirs with user parameters. This is
anatofuz
parents:
diff changeset
16 # used when we can't determine the tool dir at configuration time.
anatofuz
parents:
diff changeset
17 try:
anatofuz
parents:
diff changeset
18 config.clang_tools_dir = config.clang_tools_dir % lit_config.params
anatofuz
parents:
diff changeset
19 config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
anatofuz
parents:
diff changeset
20 config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
anatofuz
parents:
diff changeset
21 except KeyError:
anatofuz
parents:
diff changeset
22 e = sys.exc_info()[1]
anatofuz
parents:
diff changeset
23 key, = e.args
anatofuz
parents:
diff changeset
24 lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
anatofuz
parents:
diff changeset
25
anatofuz
parents:
diff changeset
26 import lit.llvm
anatofuz
parents:
diff changeset
27 lit.llvm.initialize(lit_config, config)
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 # Let the main config do the real work.
anatofuz
parents:
diff changeset
30 lit_config.load_config(config, "@CLANG_TOOLS_SOURCE_DIR@/test/lit.cfg.py")