ios: improve kit and toolchains autodetection

* simplify probe
* adapt to Xcode 5.0.1 (32->64 bits)
* force correct abi for iphonesimulator (autodetection fails)

Change-Id: Ib489d621858fd1b026222f067245a0480ea8fa03
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-10-31 17:46:52 +01:00
parent 66c7e8ca16
commit e461567500
3 changed files with 40 additions and 66 deletions

View File

@@ -108,8 +108,18 @@ void IosConfigurations::updateAutomaticKitList()
continue;
if (p.compilerPath == toolchain->compilerCommand()
&& p.backendFlags == toolchain->platformCodeGenFlags()) {
platformToolchainMap[p.name] = toolchain;
found = true;
if (p.architecture == QLatin1String("i386")
&& toolchain->targetAbi().wordWidth() != 32) {
if (debugProbe)
qDebug() << "resetting api of " << toolchain->displayName();
toolchain->setTargetAbi(Abi(Abi::X86Architecture,
Abi::MacOS, Abi::GenericMacFlavor,
Abi::MachOFormat, 32));
}
platformToolchainMap[p.name] = toolchain;
if (debugProbe)
qDebug() << p.name << " -> " << toolchain->displayName();
}
}
if (!found && (tc->displayName().startsWith(QLatin1String("iphone"))
@@ -153,6 +163,14 @@ void IosConfigurations::updateAutomaticKitList()
toolchain->setPlatformCodeGenFlags(p.backendFlags);
toolchain->setPlatformLinkerFlags(p.backendFlags);
toolchain->setCompilerCommand(p.compilerPath);
if (p.architecture == QLatin1String("i386")) {
if (debugProbe)
qDebug() << "setting toolchain Abi for " << toolchain->displayName();
toolchain->setTargetAbi(Abi(Abi::X86Architecture,Abi::MacOS, Abi::GenericMacFlavor,
Abi::MachOFormat, 32));
}
if (debugProbe)
qDebug() << "adding toolchain " << p.name;
ToolChainManager::registerToolChain(toolchain);
platformToolchainMap.insert(p.name, toolchain);
QMapIterator<QString, Platform> iter2(iter);
@@ -178,6 +196,9 @@ void IosConfigurations::updateAutomaticKitList()
|| (p.platformKind & Platform::Cxx11Support) != 0
|| !p.compilerPath.toString().contains(QLatin1String("clang")))
toRemove.append(p.name);
else if (debugProbe)
qDebug() << "keeping" << p.name << " " << p.compilerPath.toString() << " "
<< p.backendFlags;
}
foreach (const QString &pName, toRemove) {
if (debugProbe)