forked from qt-creator/qt-creator
ABI: Improve tool chain selection for Qt projects
* Set a null-ABI for toolchains where detection of ABI failed: This allows the user to select any tool chain. * Warn if ABI detection fails by showing a message in the Qt version setup dialog * Do not override the mkspec if the Qt version has a null ABI only: We (have to) trust the user to know what he is doing in that case. * GCC: Add version information to GCC tool chain and use it to select the mkspec on Mac. * GCC: Do not override mkspec if we do a cross-compile (and actually detect that). * GCC: Leave out -32 or -64 from mkspec if the compiler binaries ABI matches the target ABI. * Linux-generic is compatible with all other linuxes (both ways) The targets themselves do additional filtering and will remove anything that does not work for them anyway. Task-number: QTCREATORBUG-5756 Task-number: QTCREATORBUG-5960 Change-Id: Ib3c0ac91f3aa8e2a823e3e9891a02bdccb97af14 Reviewed-on: http://codereview.qt-project.org/4281 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -146,8 +146,9 @@ QString QMakeStep::allArguments(bool shorted)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!userProvidedMkspec)
|
||||
arguments << "-spec" << mkspec();
|
||||
QString specArg = mkspec();
|
||||
if (!userProvidedMkspec && !specArg.isEmpty())
|
||||
arguments << "-spec" << specArg;
|
||||
|
||||
// Find out what flags we pass on to qmake
|
||||
arguments << bc->configCommandLineArguments();
|
||||
@@ -454,12 +455,17 @@ QString QMakeStep::mkspec()
|
||||
}
|
||||
}
|
||||
|
||||
QtSupport::BaseQtVersion *version = bc->qtVersion();
|
||||
// We do not know which abi the Qt version has, so let's stick with the defaults
|
||||
if (version && version->qtAbis().count() == 1 && version->qtAbis().first().isNull())
|
||||
return QString();
|
||||
|
||||
const QString tcSpec = bc->toolChain() ? bc->toolChain()->mkspec() : QString();
|
||||
if (!bc->qtVersion())
|
||||
if (!version)
|
||||
return tcSpec;
|
||||
if (!tcSpec.isEmpty() && bc->qtVersion()->hasMkspec(tcSpec))
|
||||
if (!tcSpec.isEmpty() && version->hasMkspec(tcSpec))
|
||||
return tcSpec;
|
||||
return bc->qtVersion()->mkspec();
|
||||
return version->mkspec();
|
||||
}
|
||||
|
||||
QVariantMap QMakeStep::toMap() const
|
||||
|
||||
Reference in New Issue
Block a user