diff options
-rw-r--r-- | clang/test/Driver/lit.local.cfg | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Driver/lit.local.cfg b/clang/test/Driver/lit.local.cfg index af6d0213906..6c2373bd217 100644 --- a/clang/test/Driver/lit.local.cfg +++ b/clang/test/Driver/lit.local.cfg @@ -4,3 +4,15 @@ config.substitutions = list(config.substitutions) config.substitutions.insert(0, ('%clang_cc1', """*** Do not use 'clang -cc1' in Driver tests. ***""") ) + +# Remove harmful environmental variables for clang Driver tests. +# Some might be useful for other tests so they are only removed here. +driver_overwrite_env_vars = ['MACOSX_DEPLOYMENT_TARGET', + 'IPHONEOS_DEPLOYMENT_TARGET', + 'SDKROOT', 'CCC_OVERRIDE_OPTIONS', + 'CC_PRINT_OPTIONS', 'CC_PRINT_HEADERS', + 'CC_LOG_DIAGNOSTICS'] + +for name in driver_overwrite_env_vars: + if name in config.environment: + del config.environment[name] |