1 from lit.llvm import llvm_config
25 config.substitutions = list(config.substitutions)
26 config.substitutions.insert(
27 0, ("%clang_cc1", """*** Do not use 'clang -cc1' in Driver tests. ***""")
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",
36 "CCC_OVERRIDE_OPTIONS",
43 for name in driver_overwrite_env_vars:
44 if name in config.environment:
45 del config.environment[name]
47 if llvm_config.use_lld(required=False):
48 config.available_features.add("lld")
50 if config.ppc_linux_default_ieeelongdouble:
51 config.available_features.add("ppc_linux_default_ieeelongdouble")