clang-tools  11.0.0
test/lit.cfg.py
Go to the documentation of this file.
1 import lit.llvm
2 
3 lit.llvm.initialize(lit_config, config)
4 lit.llvm.llvm_config.use_clang()
5 
6 config.name = 'Clangd'
7 config.suffixes = ['.test']
8 config.excludes = ['Inputs']
9 config.test_format = lit.formats.ShTest(not lit.llvm.llvm_config.use_lit_shell)
10 config.test_source_root = config.clangd_source_dir + "/test"
11 config.test_exec_root = config.clangd_binary_dir + "/test"
12 
13 
14 # Used to enable tests based on the required targets. Can be queried with e.g.
15 # REQUIRES: x86-registered-target
16 def calculate_arch_features(arch_string):
17  return [arch.lower() + '-registered-target' for arch in arch_string.split()]
18 
19 
20 lit.llvm.llvm_config.feature_config([('--targets-built',
21  calculate_arch_features)])
22 
23 # Clangd-specific lit environment.
24 config.substitutions.append(('%clangd-benchmark-dir',
25  config.clangd_binary_dir + "/benchmarks"))
26 
27 if config.clangd_build_xpc:
28  config.available_features.add('clangd-xpc-support')
lit.calculate_arch_features
def calculate_arch_features(arch_string)
Definition: test/lit.cfg.py:16