Fix an incorrect invocation of llvm-readobj

It's never been entirely sound or necessarily correct to use single-dash
options for long options. Various other things invoked by androiddeployqt
seem to provide only single-dash options, but llvm tools and GNU tools
always provide a double-dash option. Therefore we can just change the
--needed-libs option to use double-dash without any particular version
checks or differences.

Task-number: QTBUG-104580
Change-Id: I5649b0f9565989157d934c802da1f3c4c43fca0f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
(cherry picked from commit 40ddf2c7f34e429af4d18063ca947490cdc12ba9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Ville Voutilainen 2022-06-27 10:21:13 +03:00 committed by Qt Cherry-pick Bot
parent 321c7ed7aa
commit de5fd0faa1

View File

@ -281,7 +281,7 @@ QString fileArchitecture(const Options &options, const QString &path)
return {};
}
readElf = "%1 -needed-libs %2"_L1.arg(shellQuote(readElf), shellQuote(path));
readElf = "%1 --needed-libs %2"_L1.arg(shellQuote(readElf), shellQuote(path));
FILE *readElfCommand = openProcess(readElf);
if (!readElfCommand) {
@ -1843,7 +1843,7 @@ QStringList getQtLibsFromElf(const Options &options, const QString &fileName)
return QStringList();
}
readElf = "%1 -needed-libs %2"_L1.arg(shellQuote(readElf), shellQuote(fileName));
readElf = "%1 --needed-libs %2"_L1.arg(shellQuote(readElf), shellQuote(fileName));
FILE *readElfCommand = openProcess(readElf);
if (!readElfCommand) {