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(' ');
|
||||||
qtAbiString.append(qtAbi.toString());
|
qtAbiString.append(qtAbi.toString());
|
||||||
|
|
||||||
if (!fullMatch)
|
if (!fullMatch) {
|
||||||
fullMatch = supportedAbis.contains(qtAbi);
|
fullMatch = supportedAbis.contains(qtAbi)
|
||||||
|
&& qtAbi.wordWidth() == targetAbi.wordWidth()
|
||||||
|
&& qtAbi.architecture() == targetAbi.architecture();
|
||||||
|
}
|
||||||
if (!fuzzyMatch && !fullMatch) {
|
if (!fuzzyMatch && !fullMatch) {
|
||||||
fuzzyMatch = Utils::anyOf(supportedAbis, [&](const Abi &abi) {
|
fuzzyMatch = Utils::anyOf(supportedAbis, [&](const Abi &abi) {
|
||||||
return qtAbi.isCompatibleWith(abi);
|
return qtAbi.isCompatibleWith(abi);
|
||||||
|
|||||||
@@ -224,8 +224,11 @@ void QtKitAspect::fix(Kit *k)
|
|||||||
QList<ToolChain *> possibleTcs = ToolChainManager::toolChains([version](const ToolChain *t) {
|
QList<ToolChain *> possibleTcs = ToolChainManager::toolChains([version](const ToolChain *t) {
|
||||||
if (!t->isValid() || t->language() != ProjectExplorer::Constants::CXX_LANGUAGE_ID)
|
if (!t->isValid() || t->language() != ProjectExplorer::Constants::CXX_LANGUAGE_ID)
|
||||||
return false;
|
return false;
|
||||||
return Utils::anyOf(version->qtAbis(),
|
return Utils::anyOf(version->qtAbis(), [t](const Abi &qtAbi) {
|
||||||
[t](const Abi &qtAbi) { return t->supportedAbis().contains(qtAbi); });
|
return t->supportedAbis().contains(qtAbi)
|
||||||
|
&& t->targetAbi().wordWidth() == qtAbi.wordWidth()
|
||||||
|
&& t->targetAbi().architecture() == qtAbi.architecture();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
if (!possibleTcs.isEmpty()) {
|
if (!possibleTcs.isEmpty()) {
|
||||||
// Prefer exact matches.
|
// Prefer exact matches.
|
||||||
|
|||||||
Reference in New Issue
Block a user