File: lit.site.cfg.in

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (53 lines) | stat: -rw-r--r-- 2,037 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import os
import lit

config.name = 'LLVM regression suite'
config.test_format = lit.formats.ShTest(True)
config.suffixes = ['.ll', '.c', '.cpp', '.test', '.txt', '.s', '.mir', '.mlir']
config.test_source_root = os.path.join("@CMAKE_CURRENT_SOURCE_DIR@", "tests")
config.excludes = ['Inputs']

config.available_features.add("@CMAKE_HOST_SYSTEM_PROCESSOR@")

def enable_feature(name, option):
    if option.lower() in ('on', 1):
        config.available_features.add(name)

def enable_program(name, binary):
    if os.path.exists(binary):
        config.available_features.add(name)
        config.substitutions.append(('%'+name, binary))


# The order matters, e.g. substitution for clang-format-diff
# must appear before clang-format, because the latter is a prefix of the former.

enable_program('cc', "@CMAKE_C_COMPILER@")
enable_program('cxx', "@CMAKE_CXX_COMPILER@")
enable_program('clang-tidy', "@CLANG_TIDY_BINARY@")
enable_program('clang-format-diff', "@CLANG_FORMAT_DIFF_BINARY@")
enable_program('clang-format', "@CLANG_FORMAT_BINARY@")
enable_program('clangd', "@CLANGD_BINARY@")
enable_program('clangxx', "@CLANGXX_BINARY@")
enable_program('clang', "@CLANG_BINARY@")
enable_program('llvm-nm', "@LLVMNM@")
enable_program('llc', "@LLC@")
enable_program('lli', "@LLI@")
enable_program('opt', "@OPT@")
enable_program('llvm-profdata', "@LLVMPROFDATA@")
enable_program('llvm-config', "@LLVMCONFIG_BINARY@")
enable_program('llvm-objdump', "@LLVMOBJDUMP_BINARY@")
enable_program('lldb', "@LLDB_BINARY@")
enable_program('lld', "@LLD_BINARY@")
enable_program('scan-build-py', "@SCANBUILDPY@")
enable_program('scan-build', "@SCANBUILD@")
enable_program('scan-view', "@SCANVIEW@")
enable_program('opt', "@OPT_BINARY@")
enable_program('mlir-translate', "@MLIRTRANSLATE@")

config.substitutions.append(('%cmake', '@CMAKE_COMMAND@'))

enable_feature("compiler-rt", "@ENABLE_COMPILER_RT@")
enable_feature("libc++", "@ENABLE_LIBCXX@")
enable_feature("static-libc++", "@ENABLE_STATIC_LIBCXX@")
enable_feature("libunwind", "@ENABLE_LIBUNWIND@")