forked from qt-creator/qt-creator
ProjectExplorer: Add abi for VxWorks
Change-Id: I62bf7a7c19e544307c676fb6fdf635e64cd4eba6 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Tobias Hunger
parent
9d84476f2d
commit
b8c24b9c21
@@ -333,6 +333,9 @@ Abi::Abi(const Architecture &a, const OS &o,
|
|||||||
if (m_osFlavor < WindowsMsvc2005Flavor || m_osFlavor > WindowsCEFlavor)
|
if (m_osFlavor < WindowsMsvc2005Flavor || m_osFlavor > WindowsCEFlavor)
|
||||||
m_osFlavor = UnknownFlavor;
|
m_osFlavor = UnknownFlavor;
|
||||||
break;
|
break;
|
||||||
|
case Abi::VxWorks:
|
||||||
|
if (m_osFlavor != VxWorksFlavor)
|
||||||
|
m_osFlavor = VxWorksFlavor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,8 +376,9 @@ Abi::Abi(const QString &abiString) :
|
|||||||
m_os = UnixOS;
|
m_os = UnixOS;
|
||||||
else if (abiParts.at(1) == QLatin1String("windows"))
|
else if (abiParts.at(1) == QLatin1String("windows"))
|
||||||
m_os = WindowsOS;
|
m_os = WindowsOS;
|
||||||
|
else if (abiParts.at(1) == QLatin1String("vxworks"))
|
||||||
|
m_os = VxWorks;
|
||||||
else
|
else
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,6 +415,8 @@ Abi::Abi(const QString &abiString) :
|
|||||||
m_osFlavor = WindowsMSysFlavor;
|
m_osFlavor = WindowsMSysFlavor;
|
||||||
else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
|
else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
|
||||||
m_osFlavor = WindowsCEFlavor;
|
m_osFlavor = WindowsCEFlavor;
|
||||||
|
else if (abiParts.at(2) == QLatin1String("vxworks") && m_os == VxWorks)
|
||||||
|
m_osFlavor = VxWorksFlavor;
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -513,6 +519,12 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
|||||||
width = 32;
|
width = 32;
|
||||||
} else if (p == QLatin1String("gnueabi")) {
|
} else if (p == QLatin1String("gnueabi")) {
|
||||||
format = Abi::ElfFormat;
|
format = Abi::ElfFormat;
|
||||||
|
} else if (p == QLatin1String("wrs")) {
|
||||||
|
continue;
|
||||||
|
} else if (p == QLatin1String("vxworks")) {
|
||||||
|
os = Abi::VxWorks;
|
||||||
|
flavor = Abi::VxWorksFlavor;
|
||||||
|
format = Abi::ElfFormat;
|
||||||
} else {
|
} else {
|
||||||
++unknownCount;
|
++unknownCount;
|
||||||
}
|
}
|
||||||
@@ -622,6 +634,8 @@ QString Abi::toString(const OS &o)
|
|||||||
return QLatin1String("unix");
|
return QLatin1String("unix");
|
||||||
case WindowsOS:
|
case WindowsOS:
|
||||||
return QLatin1String("windows");
|
return QLatin1String("windows");
|
||||||
|
case VxWorks:
|
||||||
|
return QLatin1String("vxworks");
|
||||||
case UnknownOS: // fall through!
|
case UnknownOS: // fall through!
|
||||||
default:
|
default:
|
||||||
return QLatin1String("unknown");
|
return QLatin1String("unknown");
|
||||||
@@ -661,6 +675,8 @@ QString Abi::toString(const OSFlavor &of)
|
|||||||
return QLatin1String("msys");
|
return QLatin1String("msys");
|
||||||
case Abi::WindowsCEFlavor:
|
case Abi::WindowsCEFlavor:
|
||||||
return QLatin1String("ce");
|
return QLatin1String("ce");
|
||||||
|
case Abi::VxWorksFlavor:
|
||||||
|
return QLatin1String("vxworks");
|
||||||
case Abi::UnknownFlavor: // fall through!
|
case Abi::UnknownFlavor: // fall through!
|
||||||
default:
|
default:
|
||||||
return QLatin1String("unknown");
|
return QLatin1String("unknown");
|
||||||
@@ -707,6 +723,8 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
|
|||||||
return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor
|
return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor
|
||||||
<< WindowsMsvc2012Flavor << WindowsMsvc2013Flavor << WindowsMSysFlavor
|
<< WindowsMsvc2012Flavor << WindowsMsvc2013Flavor << WindowsMSysFlavor
|
||||||
<< WindowsCEFlavor << UnknownFlavor;
|
<< WindowsCEFlavor << UnknownFlavor;
|
||||||
|
case VxWorks:
|
||||||
|
return result << VxWorksFlavor;
|
||||||
case UnknownOS:
|
case UnknownOS:
|
||||||
return result << UnknownFlavor;
|
return result << UnknownFlavor;
|
||||||
default:
|
default:
|
||||||
@@ -1082,6 +1100,10 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data()
|
|||||||
QTest::newRow("mips64el-linux-gnuabi") << int(Abi::MipsArchitecture)
|
QTest::newRow("mips64el-linux-gnuabi") << int(Abi::MipsArchitecture)
|
||||||
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||||
<< int(Abi::ElfFormat) << 64;
|
<< int(Abi::ElfFormat) << 64;
|
||||||
|
|
||||||
|
QTest::newRow("arm-wrs-vxworks") << int(Abi::ArmArchitecture)
|
||||||
|
<< int(Abi::VxWorks) << int(Abi::VxWorksFlavor)
|
||||||
|
<< int(Abi::ElfFormat) << 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()
|
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public:
|
|||||||
MacOS,
|
MacOS,
|
||||||
UnixOS,
|
UnixOS,
|
||||||
WindowsOS,
|
WindowsOS,
|
||||||
|
VxWorks,
|
||||||
UnknownOS
|
UnknownOS
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -91,6 +92,8 @@ public:
|
|||||||
WindowsMSysFlavor,
|
WindowsMSysFlavor,
|
||||||
WindowsCEFlavor,
|
WindowsCEFlavor,
|
||||||
|
|
||||||
|
VxWorksFlavor,
|
||||||
|
|
||||||
UnknownFlavor
|
UnknownFlavor
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user