Commit b5f48992 authored by Jake Petroules's avatar Jake Petroules

Make a few simple changes towards 64-bit iOS support.

Change-Id: Ia931f98f6f155a619b9d3efa5777d0c30e62adac
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@theqtcompany.com>
parent b72a9dd2
......@@ -123,12 +123,16 @@ void IosConfigurations::updateAutomaticKitList()
if (p.compilerPath == toolchain->compilerCommand()
&& p.backendFlags == toolchain->platformCodeGenFlags()) {
found = true;
if (p.architecture == QLatin1String("i386")
&& toolchain->targetAbi().wordWidth() != 32) {
if ((p.architecture == QLatin1String("i386")
&& toolchain->targetAbi().wordWidth() != 32) ||
(p.architecture == QLatin1String("x86_64")
&& toolchain->targetAbi().wordWidth() != 64)) {
qCDebug(kitSetupLog) << "resetting api of " << toolchain->displayName();
toolchain->setTargetAbi(Abi(Abi::X86Architecture,
Abi::MacOS, Abi::GenericMacFlavor,
Abi::MachOFormat, 32));
Abi::MachOFormat,
p.architecture.endsWith(QLatin1String("64"))
? 64 : 32));
}
platformToolchainMap[p.name] = toolchain;
qCDebug(kitSetupLog) << p.name << " -> " << toolchain->displayName();
......@@ -172,10 +176,13 @@ void IosConfigurations::updateAutomaticKitList()
toolchain->setPlatformCodeGenFlags(p.backendFlags);
toolchain->setPlatformLinkerFlags(p.backendFlags);
toolchain->resetToolChain(p.compilerPath);
if (p.architecture == QLatin1String("i386")) {
if (p.architecture == QLatin1String("i386")
|| p.architecture == QLatin1String("x86_64")) {
qCDebug(kitSetupLog) << "setting toolchain Abi for " << toolchain->displayName();
toolchain->setTargetAbi(Abi(Abi::X86Architecture,Abi::MacOS, Abi::GenericMacFlavor,
Abi::MachOFormat, 32));
Abi::MachOFormat,
p.architecture.endsWith(QLatin1String("64"))
? 64 : 32));
}
qCDebug(kitSetupLog) << "adding toolchain " << p.name;
ToolChainManager::registerToolChain(toolchain);
......
......@@ -101,6 +101,8 @@ static Abi macAbiForCpu(quint32 type) {
return Abi(Abi::PowerPCArchitecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 32);
case 12: // CPU_TYPE_ARM
return Abi(Abi::ArmArchitecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 32);
case 0x01000000 + 12: // CPU_TYPE_ARM64
return Abi(Abi::ArmArchitecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 64);
default:
return Abi();
}
......@@ -469,7 +471,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
arch = Abi::X86Architecture;
} else if (p.startsWith(QLatin1String("arm"))) {
arch = Abi::ArmArchitecture;
width = 32;
width = p.contains(QLatin1String("64")) ? 64 : 32;
} else if (p.startsWith(QLatin1String("mips"))) {
arch = Abi::MipsArchitecture;
width = p.contains(QLatin1String("64")) ? 64 : 32;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment