Commit f1d18ba3 authored by Friedemann Kleint's avatar Friedemann Kleint

Output warning when g++ - invocation fails in GccToolchain.

Change-Id: I5ed05307531f0d3a7850fb251cfa5cbd2a75e09f
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 6d8b723a
......@@ -97,10 +97,19 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons
return QByteArray();
}
const QByteArray stdErr = cpp.readAllStandardError();
if (cpp.exitCode() != 0) {
qWarning().nospace()
<< Q_FUNC_INFO << ": " << gcc.toUserOutput() << ' '
<< arguments.join(QLatin1String(" ")) << " returned exit code "
<< cpp.exitCode() << ": " << stdErr;
return QByteArray();
}
QByteArray data = cpp.readAllStandardOutput();
if (!data.isEmpty() && !data.endsWith('\n'))
data.append('\n');
data.append(cpp.readAllStandardError());
data.append(stdErr);
return data;
}
......
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