forked from qt-creator/qt-creator
PE: Set Android ABI to the Abi object instantiation
640a4f0c9c
introduced caching of qmake
output, which includes the supported abis.
Unfortunately the Abi::toString and Abi::fromString didn't serialize the
m_param value which was used by the Android plugin to specify the
Android ABI.
This commit will generate the Android ABI from the existing values.
Fixes: QTCREATORBUG-30146
Change-Id: I6770faa3953f7b423b36b9e3654a7e270d051571
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "abi.h"
|
#include "abi.h"
|
||||||
|
#include "projectexplorerconstants.h"
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
@@ -437,6 +438,18 @@ static Abis abiOf(const QByteArray &data)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QString androidAbiFromAbi(const Abi &abi)
|
||||||
|
{
|
||||||
|
QString androidAbi;
|
||||||
|
if (abi.architecture() == Abi::Architecture::ArmArchitecture)
|
||||||
|
androidAbi = QLatin1String(abi.wordWidth() == 64 ? Constants::ANDROID_ABI_ARM64_V8A
|
||||||
|
: Constants::ANDROID_ABI_ARMEABI_V7A);
|
||||||
|
else
|
||||||
|
androidAbi = QLatin1String(abi.wordWidth() == 64 ? Constants::ANDROID_ABI_X86_64
|
||||||
|
: Constants::ANDROID_ABI_X86);
|
||||||
|
return androidAbi;
|
||||||
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// Abi
|
// Abi
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -908,7 +921,11 @@ Abi Abi::fromString(const QString &abiString)
|
|||||||
return Abi(architecture, os, flavor, format, 0);
|
return Abi(architecture, os, flavor, format, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Abi(architecture, os, flavor, format, wordWidth);
|
Abi abi(architecture, os, flavor, format, wordWidth);
|
||||||
|
if (abi.os() == LinuxOS && abi.osFlavor() == AndroidLinuxFlavor)
|
||||||
|
abi.m_param = androidAbiFromAbi(abi);
|
||||||
|
|
||||||
|
return abi;
|
||||||
}
|
}
|
||||||
|
|
||||||
Abi::Architecture Abi::architectureFromString(const QString &a)
|
Abi::Architecture Abi::architectureFromString(const QString &a)
|
||||||
|
Reference in New Issue
Block a user