From ca52ed159e2bc1d359436a36841ab82ab42a69e1 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 6 Jul 2016 16:11:16 +0200 Subject: [PATCH] MSVC: Re-detect compilers if detected ABI changes Old creator versions detected MSVC 2015 with the 2005 ABIs. Upgrading from those to a current version of Creator will keep this detected ABI, effectively breaking MSVC 2015 for users upgrading from settings where it was mis-detected. Force re-creation of MSVC toolchains if the saved toolchain ABI and the currently detected ABI differ. This will break kits (as the MSVC toolchain's ID will change), but it will make sure a usable MSVC 2015 toolchain is available. Change-Id: If7d9ab0d414bb33781243bcdf5112b411ecf5c13 Reviewed-by: Orgad Shaneh --- src/plugins/projectexplorer/msvctoolchain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index eb35908f4d7..bb084b644e9 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -622,9 +622,11 @@ static ToolChain *findOrCreateToolChain(const QList &alreadyKnown, ToolChain::Detection d = ToolChain::ManualDetection) { ToolChain *tc = Utils::findOrDefault(alreadyKnown, - [&varsBat, &varsBatArg](ToolChain *tc) -> bool { + [&varsBat, &varsBatArg, &abi](ToolChain *tc) -> bool { if (tc->typeId() != Constants::MSVC_TOOLCHAIN_TYPEID) return false; + if (tc->targetAbi() != abi) + return false; auto mtc = static_cast(tc); return mtc->varsBat() == varsBat && mtc->varsBatArg() == varsBatArg;