aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/msvctoolchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/msvctoolchain.cpp')
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 9cf2ea8948..6eda22eebe 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -260,7 +260,7 @@ static QString winExpandDelayedEnvReferences(QString in, const Utils::Environmen
static Utils::Environment msvcReadEnvironmentSetting(const QString &varsBat,
const QString &args,
- const Utils::Environment &env)
+ Utils::Environment env)
{
// Run the setup script and extract the variables
Utils::Environment result = env;
@@ -286,6 +286,10 @@ static Utils::Environment msvcReadEnvironmentSetting(const QString &varsBat,
}
Utils::QtcProcess run;
+ // As of WinSDK 7.1, there is logic preventing the path from being set
+ // correctly if "ORIGINALPATH" is already set. That can cause problems
+ // if Creator is launched within a session set up by setenv.cmd.
+ env.unset(QLatin1String("ORIGINALPATH"));
run.setEnvironment(env);
const QString cmdPath = QString::fromLocal8Bit(qgetenv("COMSPEC"));
// Windows SDK setup scripts require command line switches for environment expansion.