Commit 8a276097 authored by dt's avatar dt
Browse files

Fix available toolchains for cmake and generic project manager

Reviewed-By: hunger
parent b9251a66
......@@ -402,8 +402,11 @@ void CMakeRunPage::initializePage()
m_generatorComboBox->setVisible(true);
m_generatorComboBox->clear();
ProjectExplorer::Abi abi = ProjectExplorer::Abi::hostAbi();
abi = ProjectExplorer::Abi(abi.architecture(), abi.os(), ProjectExplorer::Abi::UnknownFlavor,
abi.binaryFormat(), abi.wordWidth() == 32 ? 32 : 0);
QList<ProjectExplorer::ToolChain *> tcs =
ProjectExplorer::ToolChainManager::instance()->findToolChains(ProjectExplorer::Abi::hostAbi());
ProjectExplorer::ToolChainManager::instance()->findToolChains(abi);
foreach (ProjectExplorer::ToolChain *tc, tcs) {
ProjectExplorer::Abi targetAbi = tc->targetAbi();
QVariant tcVariant = qVariantFromValue(static_cast<void *>(tc));
......
......@@ -427,7 +427,10 @@ bool GenericProject::fromMap(const QVariantMap &map)
if (!id.isNull()) {
setToolChain(toolChainManager->findToolChain(id));
} else {
QList<ToolChain *> tcs = toolChainManager->findToolChains(Abi::hostAbi());
ProjectExplorer::Abi abi = ProjectExplorer::Abi::hostAbi();
abi = ProjectExplorer::Abi(abi.architecture(), abi.os(), ProjectExplorer::Abi::UnknownFlavor,
abi.binaryFormat(), abi.wordWidth() == 32 ? 32 : 0);
QList<ToolChain *> tcs = toolChainManager->findToolChains(abi);
if (tcs.isEmpty())
tcs = toolChainManager->toolChains();
if (!tcs.isEmpty())
......
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