forked from qt-creator/qt-creator
MSVC: Minor cleanup
Change-Id: I4aa9684e04e57a96c3fc624236c2c95817306d76 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
1d6d799d22
commit
a9c967263e
@@ -743,19 +743,18 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect(const QList<ToolChain *> &al
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
QList<ToolChain *> tmp;
|
QList<ToolChain *> tmp;
|
||||||
tmp.append(findOrCreateToolChain(alreadyKnown,
|
const QVector<QPair<MsvcToolChain::Platform, QString> > platforms = {
|
||||||
generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::x86),
|
{MsvcToolChain::x86, "x86"},
|
||||||
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::x86, sdkKey),
|
{MsvcToolChain::amd64, "x64"},
|
||||||
fi.absoluteFilePath(), QLatin1String("/x86"), ToolChain::AutoDetection));
|
{MsvcToolChain::ia64, "ia64"},
|
||||||
// Add all platforms, cross-compiler is automatically selected by SetEnv.cmd if needed
|
};
|
||||||
tmp.append(findOrCreateToolChain(alreadyKnown,
|
for (auto platform: platforms) {
|
||||||
generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::amd64),
|
tmp.append(findOrCreateToolChain(
|
||||||
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::amd64, sdkKey),
|
alreadyKnown,
|
||||||
fi.absoluteFilePath(), QLatin1String("/x64"), ToolChain::AutoDetection));
|
generateDisplayName(name, MsvcToolChain::WindowsSDK, platform.first),
|
||||||
tmp.append(findOrCreateToolChain(alreadyKnown,
|
findAbiOfMsvc(MsvcToolChain::WindowsSDK, platform.first, sdkKey),
|
||||||
generateDisplayName(name, MsvcToolChain::WindowsSDK, MsvcToolChain::ia64),
|
fi.absoluteFilePath(), "/" + platform.second, ToolChain::AutoDetection));
|
||||||
findAbiOfMsvc(MsvcToolChain::WindowsSDK, MsvcToolChain::ia64, sdkKey),
|
}
|
||||||
fi.absoluteFilePath(), QLatin1String("/ia64"), ToolChain::AutoDetection));
|
|
||||||
// Make sure the default is front.
|
// Make sure the default is front.
|
||||||
if (folder == defaultSdkPath)
|
if (folder == defaultSdkPath)
|
||||||
results = tmp + results;
|
results = tmp + results;
|
||||||
@@ -786,14 +785,16 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect(const QList<ToolChain *> &al
|
|||||||
const int version = vsName.leftRef(dotPos).toInt();
|
const int version = vsName.leftRef(dotPos).toInt();
|
||||||
const QString vcvarsAllbat = path + QLatin1String("/vcvarsall.bat");
|
const QString vcvarsAllbat = path + QLatin1String("/vcvarsall.bat");
|
||||||
if (QFileInfo(vcvarsAllbat).isFile()) {
|
if (QFileInfo(vcvarsAllbat).isFile()) {
|
||||||
QList<MsvcToolChain::Platform> platforms; // prioritized list
|
// prioritized list.
|
||||||
// x86_arm was put before amd64_arm as a workaround for auto detected windows phone
|
// x86_arm was put before amd64_arm as a workaround for auto detected windows phone
|
||||||
// toolchains. As soon as windows phone builds support x64 cross builds, this change
|
// toolchains. As soon as windows phone builds support x64 cross builds, this change
|
||||||
// can be reverted.
|
// can be reverted.
|
||||||
platforms << MsvcToolChain::x86 << MsvcToolChain::amd64_x86
|
const QVector<MsvcToolChain::Platform> platforms = {
|
||||||
<< MsvcToolChain::amd64 << MsvcToolChain::x86_amd64
|
MsvcToolChain::x86, MsvcToolChain::amd64_x86,
|
||||||
<< MsvcToolChain::arm << MsvcToolChain::x86_arm << MsvcToolChain::amd64_arm
|
MsvcToolChain::amd64, MsvcToolChain::x86_amd64,
|
||||||
<< MsvcToolChain::ia64 << MsvcToolChain::x86_ia64;
|
MsvcToolChain::arm, MsvcToolChain::x86_arm, MsvcToolChain::amd64_arm,
|
||||||
|
MsvcToolChain::ia64, MsvcToolChain::x86_ia64
|
||||||
|
};
|
||||||
foreach (const MsvcToolChain::Platform &platform, platforms) {
|
foreach (const MsvcToolChain::Platform &platform, platforms) {
|
||||||
const bool toolchainInstalled = QFileInfo(vcVarsBatFor(path, platform)).isFile();
|
const bool toolchainInstalled = QFileInfo(vcVarsBatFor(path, platform)).isFile();
|
||||||
if (hostSupportsPlatform(platform) && toolchainInstalled) {
|
if (hostSupportsPlatform(platform) && toolchainInstalled) {
|
||||||
|
Reference in New Issue
Block a user