52 lines · plain
1from lit.llvm import llvm_config2 3config.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]25config.substitutions = list(config.substitutions)26config.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.32driver_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 43for name in driver_overwrite_env_vars:44 if name in config.environment:45 del config.environment[name]46 47if llvm_config.use_lld(required=False):48 config.available_features.add("lld")49 50if config.ppc_linux_default_ieeelongdouble:51 config.available_features.add("ppc_linux_default_ieeelongdouble")52