Better error handling for strip

This commit is contained in:
probonopd
2016-09-05 21:32:03 +02:00
parent db3e2b8562
commit 6325cd4140
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -625,10 +625,17 @@ void runStrip(const QString &binaryPath)
QProcess strip;
strip.start("strip", QStringList() << "-x" << binaryPath);
strip.waitForFinished();
if (strip.exitCode() != 0) {
LogError() << strip.readAllStandardError();
LogError() << strip.readAllStandardOutput();
if (strip.exitCode() == 0)
return;
if (strip.readAllStandardError().contains("Not enough room for program headers")) {
LogError() << QFileInfo(binaryPath).completeBaseName() << "already stripped.";
} else {
LogError() << "Error stripping" << QFileInfo(binaryPath).completeBaseName() << ":" << strip.readAllStandardError();
LogError() << "Error stripping" << QFileInfo(binaryPath).completeBaseName() << ":" << strip.readAllStandardOutput();
}
}
void stripAppBinary(const QString &bundlePath)