forked from qt-creator/qt-creator
GccToolchain: Print command line arguments and error message
In case of compiler toolchain defines autodetection print relevant information needed to find out why it failed. Change-Id: I03ff5d01c39c06bd4c3a24ad51688a7a701a3c33 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "toolchainmanager.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/environment.h>
|
||||
@@ -88,10 +89,13 @@ static QByteArray runGcc(const FilePath &gcc, const QStringList &arguments, cons
|
||||
|
||||
cpp.setEnvironment(environment);
|
||||
cpp.setTimeoutS(10);
|
||||
SynchronousProcessResponse response = cpp.runBlocking(CommandLine(gcc, arguments));
|
||||
CommandLine cmdLine(gcc, arguments);
|
||||
SynchronousProcessResponse response = cpp.runBlocking(cmdLine);
|
||||
if (response.result != SynchronousProcessResponse::Finished ||
|
||||
response.exitCode != 0) {
|
||||
qWarning() << response.exitMessage(gcc.toString(), 10);
|
||||
Core::MessageManager::write("Compiler feature detection failure!");
|
||||
Core::MessageManager::write(response.exitMessage(cmdLine.toUserOutput(), 10));
|
||||
Core::MessageManager::write(QString::fromUtf8(response.allRawOutput()));
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user