From 2e8d2e361cc81a8b402aff7919b5981b79f3d7f2 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 13 Oct 2022 09:56:49 +0200 Subject: [PATCH] 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 Reviewed-by: --- src/plugins/projectexplorer/msvctoolchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index b320e474f41..125eb269722 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -2117,7 +2117,7 @@ std::optional 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"));