forked from qt-creator/qt-creator
Fix support for MSVC2012.
Change-Id: I0ecf6f2d93f1911c8a243f8159e64f7d014bd036 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -413,7 +413,8 @@ void CMakeRunPage::initializePage()
|
||||
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
|
||||
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2005Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor) {
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) {
|
||||
if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles"))
|
||||
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant);
|
||||
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
||||
|
@@ -363,7 +363,8 @@ static inline bool isMsvcFlavor(Abi::OSFlavor osf)
|
||||
{
|
||||
return osf == Abi::WindowsMsvc2005Flavor
|
||||
|| osf == Abi::WindowsMsvc2008Flavor
|
||||
|| osf == Abi::WindowsMsvc2010Flavor;
|
||||
|| osf == Abi::WindowsMsvc2010Flavor
|
||||
|| osf == Abi::WindowsMsvc2012Flavor;
|
||||
}
|
||||
|
||||
bool checkCdbConfiguration(const DebuggerStartParameters &sp, ConfigurationCheck *check)
|
||||
|
@@ -1604,11 +1604,15 @@ struct RemoteCdbMatcher : ProfileMatcher
|
||||
ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
|
||||
QTC_ASSERT(tc, return false);
|
||||
Abi abi = tc->targetAbi();
|
||||
return abi.architecture() == m_hostAbi.architecture()
|
||||
&& abi.os() == Abi::WindowsOS
|
||||
&& abi.osFlavor() == Abi::WindowsMsvc2010Flavor
|
||||
&& abi.binaryFormat() == Abi::PEFormat
|
||||
&& abi.wordWidth() == m_hostAbi.wordWidth();
|
||||
if (abi.architecture() != m_hostAbi.architecture()
|
||||
|| abi.os() != Abi::WindowsOS
|
||||
|| abi.binaryFormat() != Abi::PEFormat
|
||||
|| abi.wordWidth() != m_hostAbi.wordWidth())
|
||||
return false;
|
||||
if (abi.osFlavor() == Abi::WindowsMSysFlavor
|
||||
|| abi.osFlavor() == Abi::WindowsCEFlavor)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Abi m_hostAbi;
|
||||
|
@@ -151,8 +151,11 @@ static QList<Abi> parseCoffHeader(const QByteArray &data)
|
||||
case 10:
|
||||
flavor = Abi::WindowsMsvc2010Flavor;
|
||||
break;
|
||||
default:
|
||||
// Keep unknown flavor
|
||||
case 11:
|
||||
flavor = Abi::WindowsMsvc2012Flavor;
|
||||
break;
|
||||
default: // Keep unknown flavor
|
||||
qWarning("%s: Unknown MSVC flavour encountered.", Q_FUNC_INFO);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -403,6 +406,8 @@ Abi::Abi(const QString &abiString) :
|
||||
m_osFlavor = WindowsMsvc2008Flavor;
|
||||
else if (abiParts.at(2) == QLatin1String("msvc2010") && m_os == WindowsOS)
|
||||
m_osFlavor = WindowsMsvc2010Flavor;
|
||||
else if (abiParts.at(2) == QLatin1String("msvc2012") && m_os == WindowsOS)
|
||||
m_osFlavor = WindowsMsvc2012Flavor;
|
||||
else if (abiParts.at(2) == QLatin1String("msys") && m_os == WindowsOS)
|
||||
m_osFlavor = WindowsMSysFlavor;
|
||||
else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
|
||||
@@ -585,6 +590,8 @@ QString Abi::toString(const OSFlavor &of)
|
||||
return QLatin1String("msvc2008");
|
||||
case ProjectExplorer::Abi::WindowsMsvc2010Flavor:
|
||||
return QLatin1String("msvc2010");
|
||||
case ProjectExplorer::Abi::WindowsMsvc2012Flavor:
|
||||
return QLatin1String("msvc2012");
|
||||
case ProjectExplorer::Abi::WindowsMSysFlavor:
|
||||
return QLatin1String("msys");
|
||||
case ProjectExplorer::Abi::WindowsCEFlavor:
|
||||
@@ -626,7 +633,8 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
|
||||
case BsdOS:
|
||||
return result << FreeBsdFlavor << OpenBsdFlavor << NetBsdFlavor;
|
||||
case LinuxOS:
|
||||
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor;
|
||||
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor
|
||||
<< AndroidLinuxFlavor;
|
||||
case MacOS:
|
||||
return result << GenericMacFlavor;
|
||||
case SymbianOS:
|
||||
@@ -635,7 +643,7 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
|
||||
return result << GenericUnixFlavor << SolarisUnixFlavor;
|
||||
case WindowsOS:
|
||||
return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor
|
||||
<< WindowsMSysFlavor << WindowsCEFlavor;
|
||||
<< WindowsMsvc2012Flavor << WindowsMSysFlavor << WindowsCEFlavor;
|
||||
case UnknownOS:
|
||||
return result << UnknownFlavor;
|
||||
default:
|
||||
@@ -653,7 +661,9 @@ Abi Abi::hostAbi()
|
||||
|
||||
#if defined (Q_OS_WIN)
|
||||
os = WindowsOS;
|
||||
#if _MSC_VER == 1600
|
||||
#if _MSC_VER == 1700
|
||||
subos = WindowsMsvc2012Flavor;
|
||||
#elif _MSC_VER == 1600
|
||||
subos = WindowsMsvc2010Flavor;
|
||||
#elif _MSC_VER == 1500
|
||||
subos = WindowsMsvc2008Flavor;
|
||||
@@ -673,7 +683,11 @@ Abi Abi::hostAbi()
|
||||
format = MachOFormat;
|
||||
#endif
|
||||
|
||||
return Abi(arch, os, subos, format, QSysInfo::WordSize);
|
||||
const Abi result(arch, os, subos, format, QSysInfo::WordSize);
|
||||
if (!result.isValid())
|
||||
qWarning("Unable to completely determine the host ABI (%s).",
|
||||
qPrintable(result.toString()));
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<Abi> Abi::abisOfBinary(const Utils::FileName &path)
|
||||
@@ -806,6 +820,9 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary_data()
|
||||
QTest::newRow("dynamic QtCore: symbian")
|
||||
<< QString::fromLatin1("%1/dynamic/symbian.dll").arg(prefix)
|
||||
<< (QStringList() << QString::fromLatin1("arm-symbian-device-elf-32bit"));
|
||||
QTest::newRow("dynamic QtCore: win msvc2012 64bit")
|
||||
<< QString::fromLatin1("/tmp/win-msvc2012-64bit.dll").arg(prefix)
|
||||
<< (QStringList() << QString::fromLatin1("x86-windows-msvc2012-pe-64bit"));
|
||||
QTest::newRow("dynamic QtCore: win msvc2010 64bit")
|
||||
<< QString::fromLatin1("%1/dynamic/win-msvc2010-64bit.dll").arg(prefix)
|
||||
<< (QStringList() << QString::fromLatin1("x86-windows-msvc2010-pe-64bit"));
|
||||
|
@@ -94,6 +94,7 @@ public:
|
||||
WindowsMsvc2005Flavor,
|
||||
WindowsMsvc2008Flavor,
|
||||
WindowsMsvc2010Flavor,
|
||||
WindowsMsvc2012Flavor,
|
||||
WindowsMSysFlavor,
|
||||
WindowsCEFlavor,
|
||||
|
||||
|
@@ -109,14 +109,19 @@ static Abi findAbiOfMsvc(MsvcToolChain::Type type, MsvcToolChain::Platform platf
|
||||
else
|
||||
msvcVersionString = QLatin1String("8.0");
|
||||
}
|
||||
if (msvcVersionString.startsWith(QLatin1String("10.")))
|
||||
if (msvcVersionString.startsWith(QLatin1String("11.")))
|
||||
flavor = Abi::WindowsMsvc2012Flavor;
|
||||
else if (msvcVersionString.startsWith(QLatin1String("10.")))
|
||||
flavor = Abi::WindowsMsvc2010Flavor;
|
||||
else if (msvcVersionString.startsWith(QLatin1String("9.")))
|
||||
flavor = Abi::WindowsMsvc2008Flavor;
|
||||
else
|
||||
flavor = Abi::WindowsMsvc2005Flavor;
|
||||
|
||||
return Abi(arch, Abi::WindowsOS, flavor, Abi::PEFormat, wordWidth);
|
||||
const Abi result = Abi(arch, Abi::WindowsOS, flavor, Abi::PEFormat, wordWidth);
|
||||
if (!result.isValid())
|
||||
qWarning("Unable to completely determine the ABI of MSVC version %s (%s).",
|
||||
qPrintable(version), qPrintable(result.toString()));
|
||||
return result;
|
||||
}
|
||||
|
||||
static QString generateDisplayName(const QString &name,
|
||||
@@ -341,12 +346,21 @@ QString MsvcToolChain::typeDisplayName() const
|
||||
|
||||
QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
|
||||
{
|
||||
if (m_abi.osFlavor() == Abi::WindowsMsvc2005Flavor)
|
||||
switch (m_abi.osFlavor()) {
|
||||
case ProjectExplorer::Abi::WindowsMsvc2005Flavor:
|
||||
return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2005"));
|
||||
if (m_abi.osFlavor() == Abi::WindowsMsvc2008Flavor)
|
||||
case ProjectExplorer::Abi::WindowsMsvc2008Flavor:
|
||||
return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2008"));
|
||||
if (m_abi.osFlavor() == Abi::WindowsMsvc2010Flavor)
|
||||
case ProjectExplorer::Abi::WindowsMsvc2010Flavor:
|
||||
return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2010"));
|
||||
case ProjectExplorer::Abi::WindowsMsvc2012Flavor:
|
||||
QList<Utils::FileName>()
|
||||
<< Utils::FileName::fromString(QLatin1String("win32-msvc2012"))
|
||||
<< Utils::FileName::fromString(QLatin1String("win32-msvc2010"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return QList<Utils::FileName>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user