Debian Codegraph @

clang/test/Driver/lit.local.cfg

raw
1 from lit.llvm import llvm_config
2
3 config.suffixes = [
4 ".c",
5 ".cpp",
6 ".cppm",
7 ".h",
8 ".m",
9 ".mm",
10 ".S",
11 ".s",
12 ".f90",
13 ".F90",
14 ".f95",
15 ".cu",
16 ".rs",
17 ".cl",
18 ".clcpp",
19 ".hip",
20 ".hipi",
21 ".hlsl",
22 ".yaml",
23 ".test",
24 ]
25 config.substitutions = list(config.substitutions)
26 config.substitutions.insert(
27 0, ("%clang_cc1", """*** Do not use 'clang -cc1' in Driver tests. ***""")
28 )
29
30 # Remove harmful environmental variables for clang Driver tests.
31 # Some might be useful for other tests so they are only removed here.
32 driver_overwrite_env_vars = [
33 "MACOSX_DEPLOYMENT_TARGET",
34 "IPHONEOS_DEPLOYMENT_TARGET",
35 "SDKROOT",
36 "CCC_OVERRIDE_OPTIONS",
37 "CC_PRINT_OPTIONS",
38 "CC_PRINT_HEADERS",
39 "CC_LOG_DIAGNOSTICS",
40 "CC_PRINT_PROC_STAT",
41 ]
42
43 for name in driver_overwrite_env_vars:
44 if name in config.environment:
45 del config.environment[name]
46
47 if llvm_config.use_lld(required=False):
48 config.available_features.add("lld")
49
50 if config.ppc_linux_default_ieeelongdouble:
51 config.available_features.add("ppc_linux_default_ieeelongdouble")