Commit a4593c20 authored by Daniel Teske's avatar Daniel Teske

Fix abi of Windows SDK 7.0

Microsoft likes to name SDKs strangely. So Windows SDK 7.0 is using the
msvc 2008 compiler, Windows SDK 7.0A is bundled with msvc 2010 and
Windows SDK 7.1 actually contains a msvc 2010 compiler.

I have tested that by installing all 3 SDKS.

Task-number: QTCREATORBUG-8831

Change-Id: Iaee4e6312caf874da9584512bd72cc0617c3166b
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent a4d27bf5
......@@ -103,10 +103,10 @@ static Abi findAbiOfMsvc(MsvcToolChain::Type type, MsvcToolChain::Platform platf
QString msvcVersionString = version;
if (type == MsvcToolChain::WindowsSDK) {
if (version.startsWith(QLatin1String("7.")))
msvcVersionString = QLatin1String("10.0");
else if (version.startsWith(QLatin1String("6.")))
if (version == QLatin1String("v7.0") || version.startsWith(QLatin1String("6.")))
msvcVersionString = QLatin1String("9.0");
else if (version == QLatin1String("v7.0A") || version == QLatin1String("v7.1"))
msvcVersionString = QLatin1String("10.0");
}
if (msvcVersionString.startsWith(QLatin1String("11.")))
flavor = Abi::WindowsMsvc2012Flavor;
......@@ -492,7 +492,6 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
if (!defaultSdkPath.isEmpty()) {
foreach (const QString &sdkKey, sdkRegistry.childGroups()) {
const QString name = sdkRegistry.value(sdkKey + QLatin1String("/ProductName")).toString();
const QString version = sdkRegistry.value(sdkKey + QLatin1String("/ProductVersion")).toString();
const QString folder = sdkRegistry.value(sdkKey + QLatin1String("/InstallationFolder")).toString();
if (folder.isEmpty())
continue;
......@@ -506,14 +505,14 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
QList<ToolChain *> tmp;
tmp.append(new MsvcToolChain(generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::x86),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::x86, version),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::x86, sdkKey),
fi.absoluteFilePath(), QLatin1String("/x86"), true));
// Add all platforms, cross-compiler is automatically selected by SetEnv.cmd if needed
tmp.append(new MsvcToolChain(generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::amd64),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::amd64, version),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::amd64, sdkKey),
fi.absoluteFilePath(), QLatin1String("/x64"), true));
tmp.append(new MsvcToolChain(generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::ia64),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::ia64, version),
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::ia64, sdkKey),
fi.absoluteFilePath(), QLatin1String("/ia64"), true));
// Make sure the default is front.
if (folder == defaultSdkPath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment