Commit 34b875e1 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

ios: avoid adding toolchains that we don't use in the kits



Change-Id: Ic6f13dea277500fc9d3c3fb3b08069998d4b65ce
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent 447afbf0
......@@ -81,6 +81,23 @@ void IosConfigurations::updateAutomaticKitList()
break;
}
}
// filter out all non iphone, non base, non clang or cxx11 platforms, as we don't set up kits for those
{
QMap<QString, Platform>::iterator iter(platforms.begin());
while (iter != platforms.end()) {
const Platform &p = iter.value();
if (!p.name.startsWith(QLatin1String("iphone")) || (p.platformKind & Platform::BasePlatform) == 0
|| (p.platformKind & Platform::Cxx11Support) != 0
|| !p.compilerPath.toString().contains(QLatin1String("clang")))
iter = platforms.erase(iter);
else {
if (debugProbe)
qDebug() << "keeping" << p.name << " " << p.compilerPath.toString() << " "
<< p.backendFlags;
++iter;
}
}
}
QMap<QString, GccToolChain *> platformToolchainMap;
// check existing toolchains (and remove old ones)
......@@ -135,10 +152,7 @@ void IosConfigurations::updateAutomaticKitList()
while (iter.hasNext()) {
iter.next();
const Platform &p = iter.value();
if (platformToolchainMap.contains(p.name)
|| (p.platformKind & Platform::BasePlatform) == 0
|| (p.name.startsWith(QLatin1String("iphone"))
&& (p.platformKind & Platform::Cxx11Support) != 0))
if (platformToolchainMap.contains(p.name))
continue;
GccToolChain *toolchain;
if (p.compilerPath.toFileInfo().baseName().startsWith(QLatin1String("clang")))
......@@ -186,27 +200,6 @@ void IosConfigurations::updateAutomaticKitList()
}
}
}
// filter out all non iphone, non base, non clang or cxx11 platforms, as we don't set up kits for those
{
QStringList toRemove;
QMapIterator<QString, Platform> iter(platforms);
while (iter.hasNext()) {
iter.next();
const Platform &p = iter.value();
if (!p.name.startsWith(QLatin1String("iphone")) || (p.platformKind & Platform::BasePlatform) == 0
|| (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)
qDebug() << "filtering out " << pName;
platforms.remove(pName);
}
}
QMap<Abi::Architecture, QList<BaseQtVersion *> > qtVersionsForArch;
foreach (BaseQtVersion *qtVersion, QtVersionManager::versions()) {
if (debugProbe)
......
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