3 lit
.llvm
.initialize(lit_config
, config
)
4 lit
.llvm
.llvm_config
.use_clang([], [], required
=False)
5 lit
.llvm
.llvm_config
.use_default_substitutions()
8 config
.suffixes
= ['.test']
9 config
.excludes
= ['Inputs']
10 config
.test_format
= lit
.formats
.ShTest(not lit
.llvm
.llvm_config
.use_lit_shell
)
11 config
.test_source_root
= config
.clangd_source_dir
+ "/test"
12 config
.test_exec_root
= config
.clangd_binary_dir
+ "/test"
15 # Used to enable tests based on the required targets. Can be queried with e.g.
16 # REQUIRES: x86-registered-target
17 def calculate_arch_features(arch_string
):
18 return [arch
.lower() + '-registered-target' for arch
in arch_string
.split()]
21 lit
.llvm
.llvm_config
.feature_config([('--targets-built',
22 calculate_arch_features
)])
24 # Clangd-specific lit environment.
25 config
.substitutions
.append(('%clangd-benchmark-dir',
26 config
.clangd_binary_dir
+ "/benchmarks"))
28 if config
.clangd_build_xpc
:
29 config
.available_features
.add('clangd-xpc-support')
31 if config
.clangd_enable_remote
:
32 config
.available_features
.add('clangd-remote-index')
34 if config
.clangd_tidy_checks
:
35 config
.available_features
.add('clangd-tidy-checks')
38 config
.available_features
.add('zlib')