diff --git a/src/plugins/mcusupport/mcutargetfactory.cpp b/src/plugins/mcusupport/mcutargetfactory.cpp index 09c4583c2cd..883e0d6f06e 100644 --- a/src/plugins/mcusupport/mcutargetfactory.cpp +++ b/src/plugins/mcusupport/mcutargetfactory.cpp @@ -50,16 +50,6 @@ bool isDesktopToolchain(McuToolChainPackage::ToolChainType type) } -const static QMap toolchainTypeMapping{ - {"iar", McuToolChainPackage::ToolChainType::IAR}, - {"keil", McuToolChainPackage::ToolChainType::KEIL}, - {"msvc", McuToolChainPackage::ToolChainType::MSVC}, - {"gcc", McuToolChainPackage::ToolChainType::GCC}, - {"armgcc", McuToolChainPackage::ToolChainType::ArmGcc}, - {"ghs", McuToolChainPackage::ToolChainType::GHS}, - {"ghsarm", McuToolChainPackage::ToolChainType::GHSArm}, -}; - McuPackageVersionDetector *createVersionDetection(const VersionDetection &versionDetection) { if (!versionDetection.xmlElement.isEmpty() && !versionDetection.xmlAttribute.isEmpty()) @@ -183,6 +173,16 @@ McuPackagePtr McuTargetFactory::createPackage(const PackageDescription &pkgDesc) McuToolChainPackage *McuTargetFactory::createToolchain( const McuTargetDescription::Toolchain &toolchain) { + const static QMap toolchainTypeMapping{ + {"iar", McuToolChainPackage::ToolChainType::IAR}, + {"keil", McuToolChainPackage::ToolChainType::KEIL}, + {"msvc", McuToolChainPackage::ToolChainType::MSVC}, + {"gcc", McuToolChainPackage::ToolChainType::GCC}, + {"armgcc", McuToolChainPackage::ToolChainType::ArmGcc}, + {"ghs", McuToolChainPackage::ToolChainType::GHS}, + {"ghsarm", McuToolChainPackage::ToolChainType::GHSArm}, + }; + const PackageDescription compilerDescription{toolchain.compiler}; McuToolChainPackage::ToolChainType toolchainType