forked from qt-creator/qt-creator
MSVC support: Fix "detection" of supported ABIs for the 2015 build tools
The VS 2015 Build Tools are unlike any other VS or Build Tools installation and thus need their own hack. Fixes: QTCREATORBUG-22960 Change-Id: Icdbc2ad641e544a9a9d58887fde30b6ad3c28d26 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
@@ -776,6 +776,8 @@ void MsvcToolChain::updateEnvironmentModifications(QList<Utils::EnvironmentItem>
|
||||
|
||||
void MsvcToolChain::detectInstalledAbis()
|
||||
{
|
||||
if (!m_supportedAbis.isEmpty()) // Build Tools 2015
|
||||
return;
|
||||
static QMap<QString, Abis> abiCache;
|
||||
const QString vcVarsBase
|
||||
= QDir::fromNativeSeparators(m_vcvarsBat).left(m_vcvarsBat.lastIndexOf('/'));
|
||||
@@ -1282,6 +1284,13 @@ void MsvcToolChain::changeVcVarsCall(const QString &varsBat, const QString &vars
|
||||
}
|
||||
}
|
||||
|
||||
void MsvcToolChain::setSupportedAbi(const Abi &abi)
|
||||
{
|
||||
// Hack for Build Tools 2015 only.
|
||||
QTC_CHECK(m_supportedAbis.isEmpty());
|
||||
m_supportedAbis = { abi };
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// MsvcBasedToolChainConfigWidget: Creates a simple GUI without error label
|
||||
// to display name and varsBat. Derived classes should add the error label and
|
||||
@@ -1900,6 +1909,7 @@ static void detectCppBuildTools2015(QList<ToolChain *> *list)
|
||||
QLatin1String(e.varsBatArg));
|
||||
tc->setDetection(ToolChain::AutoDetection);
|
||||
tc->setLanguage(language);
|
||||
tc->setSupportedAbi(abi);
|
||||
list->append(tc);
|
||||
}
|
||||
}
|
||||
|
@@ -98,6 +98,8 @@ public:
|
||||
void setVarsBatArg(const QString &varsBA) { m_varsBatArg = varsBA; }
|
||||
void changeVcVarsCall(const QString &varsBat, const QString &varsBatArgs = QString());
|
||||
|
||||
void setSupportedAbi(const Abi &abi);
|
||||
|
||||
bool operator==(const ToolChain &) const override;
|
||||
|
||||
bool isJobCountSupported() const override { return false; }
|
||||
|
Reference in New Issue
Block a user