forked from qt-creator/qt-creator
Accept --gcctoolchain= argument to GCC-based compilers
Change-Id: I12c9d2e489b210433e9270de22783bbdc5c9544e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -365,7 +365,9 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const
|
|||||||
QStringList arguments = gccPredefinedMacrosOptions();
|
QStringList arguments = gccPredefinedMacrosOptions();
|
||||||
for (int iArg = 0; iArg < allCxxflags.length(); ++iArg) {
|
for (int iArg = 0; iArg < allCxxflags.length(); ++iArg) {
|
||||||
const QString &a = allCxxflags.at(iArg);
|
const QString &a = allCxxflags.at(iArg);
|
||||||
if (a == QLatin1String("-arch")) {
|
if (a.startsWith("--gcc-toolchain=")) {
|
||||||
|
arguments << a;
|
||||||
|
} else if (a == QLatin1String("-arch")) {
|
||||||
if (++iArg < allCxxflags.length() && !arguments.contains(a))
|
if (++iArg < allCxxflags.length() && !arguments.contains(a))
|
||||||
arguments << a << allCxxflags.at(iArg);
|
arguments << a << allCxxflags.at(iArg);
|
||||||
} else if (a == QLatin1String("--sysroot") || a == QLatin1String("-isysroot")
|
} else if (a == QLatin1String("--sysroot") || a == QLatin1String("-isysroot")
|
||||||
@@ -539,7 +541,7 @@ QList<HeaderPath> GccToolChain::systemHeaderPaths(const QStringList &cxxflags, c
|
|||||||
QStringList flags;
|
QStringList flags;
|
||||||
flags << m_platformCodeGenFlags << cxxflags;
|
flags << m_platformCodeGenFlags << cxxflags;
|
||||||
foreach (const QString &a, flags) {
|
foreach (const QString &a, flags) {
|
||||||
if (a.startsWith(QLatin1String("-stdlib=")))
|
if (a.startsWith(QLatin1String("-stdlib=")) || a.startsWith("--gcctoolchain="))
|
||||||
arguments << a;
|
arguments << a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user