McuSupport: Specify MSVC type for toolchain pick up

The current criteria allows to select LLVM so that it can cause
an unexpected behavior. Explicit toolchain type check will prevent
the invalid toolchain setup.

Change-Id: Ib0afa4304650dd451c12d7a8d950b26115661862
Reviewed-by: Yasser Grimes <yasser.grimes@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Daniele Bortolotti <daniele.bortolotti@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Kwangsub Kim
2022-10-21 12:38:21 +02:00
parent 4fdbfe1641
commit 02024303b1

View File

@@ -325,6 +325,7 @@ ToolChain *McuToolChainPackage::msvcToolChain(Id language)
return (abi.osFlavor() == Abi::WindowsMsvc2017Flavor return (abi.osFlavor() == Abi::WindowsMsvc2017Flavor
|| abi.osFlavor() == Abi::WindowsMsvc2019Flavor) || abi.osFlavor() == Abi::WindowsMsvc2019Flavor)
&& abi.architecture() == Abi::X86Architecture && abi.wordWidth() == 64 && abi.architecture() == Abi::X86Architecture && abi.wordWidth() == 64
&& t->typeId() == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
&& t->language() == language; && t->language() == language;
}); });
return toolChain; return toolChain;