Add the command line option --no-strip to androiddeployqt

There are certain use cases for keeping debug information on the
device, for example collecting stack traces when the app crashes.

[ChangeLog][Android] Added the --no-strip command line option to
androiddeployqt.

Change-Id: I96574c2c57d85fb23d5fc65380e471fa892b6543
Fixes: QTBUG-57771
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
bb10
Joerg Bornemann 2019-01-09 10:33:30 +01:00
parent b782004149
commit fa2821b484
1 changed files with 6 additions and 0 deletions

View File

@ -128,6 +128,7 @@ struct Options
bool build;
bool gradle;
bool auxMode;
bool stripLibraries = true;
QTime timer;
// External tools
@ -437,6 +438,8 @@ Options parseOptions()
options.generateAssetsFileList = false;
} else if (argument.compare(QLatin1String("--aux-mode"), Qt::CaseInsensitive) == 0) {
options.auxMode = true;
} else if (argument.compare(QLatin1String("--no-strip"), Qt::CaseInsensitive) == 0) {
options.stripLibraries = false;
}
}
@ -525,6 +528,7 @@ void printHelp()
" --aux-mode: Operate in auxiliary mode. This will only copy the\n"
" dependencies into the build directory and update the XML templates.\n"
" The project will not be built or installed.\n"
" --no-strip: Do not strip debug symbols from libraries.\n"
" --help: Displays this information.\n\n",
qPrintable(QCoreApplication::arguments().at(0))
);
@ -1897,6 +1901,8 @@ bool stripFile(const Options &options, const QString &fileName)
bool stripLibraries(const Options &options)
{
if (!options.stripLibraries)
return true;
if (options.verbose)
fprintf(stdout, "Stripping libraries to minimize size.\n");