Index: llvm/trunk/utils/lit/lit/TestingConfig.py =================================================================== --- llvm/trunk/utils/lit/lit/TestingConfig.py +++ llvm/trunk/utils/lit/lit/TestingConfig.py @@ -26,7 +26,16 @@ 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL', 'SANITIZER_IGNORE_CVE_2016_2143', 'TMPDIR', 'TMP', 'TEMP', 'TEMPDIR', 'AVRLIT_BOARD', 'AVRLIT_PORT', - 'FILECHECK_DUMP_INPUT_ON_FAILURE', 'FILECHECK_OPTS'] + 'FILECHECK_DUMP_INPUT_ON_FAILURE', 'FILECHECK_OPTS', + 'VCINSTALLDIR', 'VCToolsinstallDir', 'VSINSTALLDIR', + 'WindowsSdkDir', 'WindowsSDKLibVersion'] + + if sys.platform == 'win32': + pass_vars.append('INCLUDE') + pass_vars.append('LIB') + pass_vars.append('PATHEXT') + environment['PYTHONBUFFERED'] = '1' + for var in pass_vars: val = os.environ.get(var, '') # Check for empty string as some variables such as LD_PRELOAD cannot be empty @@ -34,15 +43,6 @@ if val: environment[var] = val - if sys.platform == 'win32': - environment.update({ - 'INCLUDE' : os.environ.get('INCLUDE',''), - 'PATHEXT' : os.environ.get('PATHEXT',''), - 'PYTHONUNBUFFERED' : '1', - 'TEMP' : os.environ.get('TEMP',''), - 'TMP' : os.environ.get('TMP',''), - }) - # Set the default available features based on the LitConfig. available_features = [] if litConfig.useValgrind: