Commit 7f9e9d22 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Make PATH shorter

Make sure to not make PATH too long on windows: Windows can only handle
PATHes that are not too long.

Task-number: QTCREATORBUG-7844
Change-Id: I069d498c63e06a3164af5e36a8c757dfd0bcf75a
Reviewed-by: default avatarThomas Hartmann <>
Reviewed-by: default avatarAndreas Holzammer <>
parent b4e605bf
......@@ -1197,10 +1197,15 @@ bool BaseQtVersion::queryQMakeVariables(const Utils::FileName &binary, QHash<QSt
Utils::Environment env = Utils::Environment::systemEnvironment();
#ifdef Q_OS_WIN
// Add tool chain environments. This is necessary for non-static qmakes e.g. using mingw on windows
// Add tool chain environment. This is necessary for non-static qmakes e.g. using mingw on windows
// We can not just add all the environments of all tool chains since that will make PATH too long
// which in turn will trigger a crash when parsing the results of vcvars.bat of MSVC.
QList<ProjectExplorer::Abi> abiList = ProjectExplorer::Abi::abisOfBinary(binary);
QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains();
foreach (ProjectExplorer::ToolChain *tc, tcList)
foreach (ProjectExplorer::ToolChain *tc, tcList) {
if (abiList.contains(tc->targetAbi()))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment