forked from qt-creator/qt-creator
Toolchain: set triple in msvctoolchain class
Move triple set up to msvc toolchain class, use another triple for x86_64 Change-Id: I3aebb051eb5d93accc6073e01391bf972199c2cb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -40,9 +40,7 @@ ToolChainInfo::ToolChainInfo(const ProjectExplorer::ToolChain *toolChain,
|
||||
isMsvc2015ToolChain
|
||||
= toolChain->targetAbi().osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor;
|
||||
wordWidth = toolChain->targetAbi().wordWidth();
|
||||
targetTriple = type == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
|
||||
? QLatin1String("i686-pc-windows-msvc")
|
||||
: toolChain->originalTargetTriple(); // OK, compiler run is already cached.
|
||||
targetTriple = toolChain->originalTargetTriple();
|
||||
|
||||
// ...and save the potentially expensive operations for later so that
|
||||
// they can be run from a worker thread.
|
||||
|
@@ -97,6 +97,13 @@ bool AbstractMsvcToolChain::isValid() const
|
||||
return fi.isFile() && fi.isExecutable();
|
||||
}
|
||||
|
||||
QString AbstractMsvcToolChain::originalTargetTriple() const
|
||||
{
|
||||
return m_abi.wordWidth() == 64
|
||||
? QLatin1String("x86_64-pc-windows-msvc")
|
||||
: QLatin1String("i686-pc-windows-msvc");
|
||||
}
|
||||
|
||||
ToolChain::PredefinedMacrosRunner AbstractMsvcToolChain::createPredefinedMacrosRunner() const
|
||||
{
|
||||
Utils::Environment env(m_lastEnvironment);
|
||||
|
@@ -50,6 +50,8 @@ public:
|
||||
|
||||
bool isValid() const override;
|
||||
|
||||
QString originalTargetTriple() const override;
|
||||
|
||||
PredefinedMacrosRunner createPredefinedMacrosRunner() const override;
|
||||
QByteArray predefinedMacros(const QStringList &cxxflags) const override;
|
||||
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
|
||||
|
Reference in New Issue
Block a user