Parse "aarch64" as 64bit "arm" ABI

"aarch64" seems to be the most common name for the 64bit ARM
architecture and we should autodetect it.

Change-Id: I7deccde15fa22d37965b2f28e4a6e998da7f81ae
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-03-15 15:28:29 +01:00
parent 12889af047
commit 07f80f6de8

View File

@@ -350,6 +350,8 @@ Abi::Abi(const QString &abiString) :
m_architecture = UnknownArchitecture;
else if (abiParts.at(0) == QLatin1String("arm"))
m_architecture = ArmArchitecture;
else if (abiParts.at(0) == QLatin1String("aarch64"))
m_architecture = ArmArchitecture;
else if (abiParts.at(0) == QLatin1String("x86"))
m_architecture = X86Architecture;
else if (abiParts.at(0) == QLatin1String("mips"))
@@ -482,6 +484,9 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
} else if (p.startsWith(QLatin1String("arm"))) {
arch = Abi::ArmArchitecture;
width = p.contains(QLatin1String("64")) ? 64 : 32;
} else if (p.startsWith(QLatin1String("aarch64"))) {
arch = Abi::ArmArchitecture;
width = 64;
} else if (p.startsWith(QLatin1String("mips"))) {
arch = Abi::MipsArchitecture;
width = p.contains(QLatin1String("64")) ? 64 : 32;
@@ -1131,6 +1136,10 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data()
QTest::newRow("x86_64-unknown-openbsd") << int(Abi::X86Architecture)
<< int(Abi::BsdOS) << int(Abi::OpenBsdFlavor)
<< int(Abi::ElfFormat) << 64;
QTest::newRow("aarch64-unknown-linux-gnu") << int(Abi::ArmArchitecture)
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
<< int(Abi::ElfFormat) << 64;
}
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()