Commit c0bffe1d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

ProjectExplorer: Add compiler path when running GCC

Running it from another directory without having its directory in PATH
fails on Windows because it cannot find libwinpthread-1.dll.

Change-Id: I96b976942ace48120b69001f5dddd573195bdfb4
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 1a1681bb
......@@ -719,7 +719,10 @@ GccToolChain::GccToolChain(const GccToolChain &) = default;
void GccToolChain::addToEnvironment(Environment &env) const
{
Q_UNUSED(env);
// On Windows gcc invokes cc1plus which is in libexec directory.
// cc1plus depends on libwinpthread-1.dll which is in bin, so bin must be in the PATH.
if (HostOsInfo::isWindowsHost())
addCommandPathToEnvironment(m_compilerCommand, env);
}
FileNameList GccToolChain::suggestedMkspecList() const
......
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