Android: Fix for multi-ABI build in androiddeployqt

7499fd0229d63f969bf6ca58d3b764b96395bed2 commit cleans up the localLibs
to not add dependencies to the libs.xml file as they will not be
satisfied.

Mentioned change created a regression with multi-ABI build. It happens
because in qtDependencies[ARCH] container, some libs just have different
atchitecture prefix.

This commit remove architecture prefix when checking libs in
qtDependencies container.

Fixes: QTBUG-131707
Change-Id: Iae54779bfa4bd143ec35353604724d8ec4e35ef2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e59308c5119caac5d4f1024c7d8147e9887cb246)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6e3d2ad44f5a2c0baae8124c828e8998a14e1c25)
This commit is contained in:
Bartlomiej Moskal 2024-11-28 18:33:40 +01:00 committed by Qt Cherry-pick Bot
parent 155e814183
commit e0e0854b05

View File

@ -1762,10 +1762,15 @@ bool updateLibsXml(Options *options)
QStringList localLibs;
localLibs = options->localLibs[it.key()];
const QString archSuffix = it.key() + ".so"_L1;
const QList<QtDependency>& deps = options->qtDependencies[it.key()];
auto notExistsInDependencies = [&deps] (const QString &lib) {
auto notExistsInDependencies = [&deps, archSuffix] (const QString &libName) {
QString lib = QFileInfo(libName).fileName();
if (lib.endsWith(archSuffix))
lib.chop(archSuffix.length());
return std::none_of(deps.begin(), deps.end(), [&lib] (const QtDependency &dep) {
return QFileInfo(dep.absolutePath).fileName() == QFileInfo(lib).fileName();
return QFileInfo(dep.absolutePath).fileName().contains(lib);
});
};