ProjectExplorer: Do not prepend compiler path to PATH everywhere!

Do not unconditionally prepend the (c++) compiler path to PATH for
all projects using GCC-derived toolchains.

Prepend the compiler path in the Qmake- and GenericBuildConfigurations
instead.

Also change the order: Apply buildconfiguration's addToEnvironment first,
only then apply the kit's addToEnvironment.

This does change a few things:
 * CMake and Qbs will now get the normal PATH
 * MSVC compilers will have their compiler path prepended to PATH
   by the effected BuildConfigurations. This should be harmless,
   since that happens before the environment setup script is appended.

Task-number: QTCREATORBUG-18714
Change-Id: I548182bc447d80d24f4de4ce7cf12ee1a753ed26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2017-10-17 12:27:37 +02:00
parent 527594bb83
commit 10cb0b77a0
7 changed files with 40 additions and 2 deletions

View File

@@ -756,6 +756,11 @@ BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const
return Release;
}
void QmakeBuildConfiguration::addToEnvironment(Environment &env) const
{
prependCompilerPathToEnvironment(env);
}
QmakeBuildConfiguration::LastKitState::LastKitState() { }
QmakeBuildConfiguration::LastKitState::LastKitState(Kit *k)