From fa2821b484dfe21de1af508bec314ff865917014 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 9 Jan 2019 10:33:30 +0100 Subject: 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 Reviewed-by: Andy Shaw --- src/tools/androiddeployqt/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tools') diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index 587ae21e4f..af3a3ae39a 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -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"); -- cgit v1.2.3