forked from qt-creator/qt-creator
ProjectExplorer: Do not pass the -fcolor-diagnostic option
... when detecting toolchains. Apparently, this can somehow get onto the command line due to CMake magic even when not actually present in the project flags, and older GCCs don't know about it. Change-Id: I4dc2e0eb3d3ed325f8d250aa51ccc139f95379b9 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -570,7 +570,9 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
|
||||
|| a == "-gcc-toolchain" || a == "-target" || a == "-mllvm" || a == "-isystem") {
|
||||
if (++i < allFlags.length())
|
||||
filtered << a << allFlags.at(i);
|
||||
} else if (a.startsWith("-m") || a.startsWith("-f") || a.startsWith("-O")
|
||||
} else if (a.startsWith("-m")
|
||||
|| (a.startsWith("-f") && !a.startsWith("-fcolor") && !a.startsWith("-fno-color"))
|
||||
|| a.startsWith("-O")
|
||||
|| a.startsWith("-std=") || a.startsWith("-stdlib=")
|
||||
|| a.startsWith("-specs=") || a == "-ansi" || a == "-undef"
|
||||
|| a.startsWith("-D") || a.startsWith("-U")
|
||||
|
Reference in New Issue
Block a user