forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user