From c642ec5ceef86e3cbd5851e50a0be85be4a36053 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 18 Sep 2024 12:52:51 +0200 Subject: [PATCH] ProjectExplorer: Fix Abi::isValid() for WebAssembly Fixes: QTCREATORBUG-31577 Change-Id: I38545642aa97300e34989f44d3e32718f0b866cc Reviewed-by: Alessandro Portale --- src/plugins/projectexplorer/abi.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index cf5a8aca6ef..34289f9d8ba 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -737,11 +737,13 @@ bool Abi::isCompatibleWith(const Abi &other) const bool Abi::isValid() const { - return m_architecture != UnknownArchitecture - && m_os != UnknownOS - && m_osFlavor != UnknownFlavor - && m_binaryFormat != UnknownFormat - && m_wordWidth != 0; + if (m_architecture == UnknownArchitecture || m_binaryFormat == UnknownFormat + || m_wordWidth == 0) { + return false; + } + + return m_architecture == AsmJsArchitecture + || (m_os != UnknownOS && m_osFlavor != UnknownFlavor); } bool Abi::isNull() const