Beispiel #1
0
static QList<ProjectExplorer::Abi> guessGccAbi(const Utils::FileName &path, const QStringList &env)
{
    if (path.isEmpty())
        return QList<ProjectExplorer::Abi>();

    QStringList arguments(QLatin1String("-dumpmachine"));
    QString machine = QString::fromLocal8Bit(runGcc(path, arguments, env)).trimmed();
    return guessGccAbi(machine);
}
Beispiel #2
0
Abi GccToolChain::targetAbi() const
{
    if (!m_targetAbi.isValid()) {
        Utils::Environment env = Utils::Environment::systemEnvironment();
        addToEnvironment(env);
        m_targetAbi = guessGccAbi(m_compilerPath, env.toStringList());
        m_supports64Bit = (m_targetAbi.wordWidth() == 64);
        if (m_targetAbi.wordWidth() == 64 && m_forcedTo32Bit)
            m_targetAbi = Abi(m_targetAbi.architecture(), m_targetAbi.os(), m_targetAbi.osFlavor(),
                              m_targetAbi.binaryFormat(), 32);

        if (displayName() == typeName())
            setDisplayName(defaultDisplayName());
    }
    return m_targetAbi;
}
Beispiel #3
0
static ProjectExplorer::Abi guessGccAbi(const QString &path, const QStringList &env)
{
    QStringList arguments(QLatin1String("-dumpmachine"));
    QString machine = QString::fromLocal8Bit(runGcc(path, arguments, env)).trimmed();
    return guessGccAbi(machine);
}