forked from qt-creator/qt-creator
ProjectExplorer: refine toolchain abi check
Filter out toolchains targeting a different word with or architecture than the Qt version. Change-Id: Iac2fb1b30d493e10dc4bd92b5585bbb9faa76d4a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -526,8 +526,11 @@ Tasks BaseQtVersion::validateKit(const Kit *k)
|
||||
qtAbiString.append(' ');
|
||||
qtAbiString.append(qtAbi.toString());
|
||||
|
||||
if (!fullMatch)
|
||||
fullMatch = supportedAbis.contains(qtAbi);
|
||||
if (!fullMatch) {
|
||||
fullMatch = supportedAbis.contains(qtAbi)
|
||||
&& qtAbi.wordWidth() == targetAbi.wordWidth()
|
||||
&& qtAbi.architecture() == targetAbi.architecture();
|
||||
}
|
||||
if (!fuzzyMatch && !fullMatch) {
|
||||
fuzzyMatch = Utils::anyOf(supportedAbis, [&](const Abi &abi) {
|
||||
return qtAbi.isCompatibleWith(abi);
|
||||
|
||||
@@ -224,8 +224,11 @@ void QtKitAspect::fix(Kit *k)
|
||||
QList<ToolChain *> possibleTcs = ToolChainManager::toolChains([version](const ToolChain *t) {
|
||||
if (!t->isValid() || t->language() != ProjectExplorer::Constants::CXX_LANGUAGE_ID)
|
||||
return false;
|
||||
return Utils::anyOf(version->qtAbis(),
|
||||
[t](const Abi &qtAbi) { return t->supportedAbis().contains(qtAbi); });
|
||||
return Utils::anyOf(version->qtAbis(), [t](const Abi &qtAbi) {
|
||||
return t->supportedAbis().contains(qtAbi)
|
||||
&& t->targetAbi().wordWidth() == qtAbi.wordWidth()
|
||||
&& t->targetAbi().architecture() == qtAbi.architecture();
|
||||
});
|
||||
});
|
||||
if (!possibleTcs.isEmpty()) {
|
||||
// Prefer exact matches.
|
||||
|
||||
Reference in New Issue
Block a user