diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2012-09-20 13:20:10 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2012-09-21 15:48:31 +0200 |
commit | 7f9e9d226c8d6dcc33005059296f3a0d8158e673 (patch) | |
tree | 24400a46ccdf4815eefb9a4d3bf5a40126817c67 /src/plugins/qtsupport | |
parent | b4e605bfba21695af71111c59a7f49584d8e6d50 (diff) | |
download | qt-creator-7f9e9d226c8d6dcc33005059296f3a0d8158e673.tar.gz |
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: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Diffstat (limited to 'src/plugins/qtsupport')
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 98f986ce34..4199da9a30 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -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) - tc->addToEnvironment(env); + foreach (ProjectExplorer::ToolChain *tc, tcList) { + if (abiList.contains(tc->targetAbi())) + tc->addToEnvironment(env); + } #endif process.setEnvironment(env.toStringList()); |