ToolChain: Add support for mkspecs

Make the toolchains report their mkspec files and use the mkspec of the
toolchain if it does provide one. Fall back to the Qt version's mkspec
otherwise.

Task-number: QTCREATORBUG-4396
This commit is contained in:
Tobias Hunger
2011-04-07 13:12:55 +02:00
parent 5cf0e625cc
commit df7aa6b578
16 changed files with 86 additions and 4 deletions

View File

@@ -130,12 +130,18 @@ QString QMakeStep::allArguments(bool shorted)
arguments << QDir::toNativeSeparators(buildConfiguration()->target()->project()->file()->fileName());
arguments << "-r";
bool haveSpec = false;
for (Utils::QtcProcess::ArgIterator ait(&additonalArguments); ait.next(); )
if (ait.value() == QLatin1String("-spec"))
goto haveSpec;
if (bc->qtVersion())
arguments << "-spec" << bc->qtVersion()->mkspec();
haveSpec:
haveSpec = true;
if (!haveSpec) {
const QString tcSpec = bc->toolChain() ? bc->toolChain()->mkspec() : QString();
if (!tcSpec.isEmpty() && bc->qtVersion()->hasMkspec(tcSpec))
arguments << "-spec" << tcSpec;
else
arguments << "-spec" << bc->qtVersion()->mkspec();
}
// Find out what flags we pass on to qmake
arguments << bc->configCommandLineArguments();