ProjectExplorer: skip cmd autorun for msvc detection

3rd party application like clink can slow down the execution of msvc env
script drasticly. And especially the vcvars script that collects the
msvc environment modifications should be checked without any additional
user modifications.

Task-number: QTCREATORBUG-27906
Change-Id: I7393a3e7e367a26408e52a419ccba75ed8e3cad0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
David Schulz
2022-10-13 09:56:49 +02:00
parent 89e90f31f1
commit 2e8d2e361c

View File

@@ -2117,7 +2117,7 @@ std::optional<QString> MsvcToolChain::generateEnvironmentSettings(const Utils::E
if (cmdPath.isEmpty())
cmdPath = env.searchInPath(QLatin1String("cmd.exe"));
// Windows SDK setup scripts require command line switches for environment expansion.
CommandLine cmd(cmdPath, {"/E:ON", "/V:ON", "/c", saver.filePath().toUserOutput()});
CommandLine cmd(cmdPath, {"/D", "/E:ON", "/V:ON", "/c", saver.filePath().toUserOutput()});
qCDebug(Log) << "readEnvironmentSetting: " << call << cmd.toUserOutput()
<< " Env: " << runEnv.toStringList().size();
run.setCodec(QTextCodec::codecForName("UTF-8"));