forked from qt-creator/qt-creator
CppEditor: Transform deprecated -gcc-toolchain option
See https://reviews.llvm.org/D108494. Change-Id: I85b2a0ea077d2a622fac16bda009a7ee71da0e90 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -791,6 +791,7 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
bool containsDriverMode = false;
|
bool containsDriverMode = false;
|
||||||
bool skipNext = false;
|
bool skipNext = false;
|
||||||
bool nextIsTarget = false;
|
bool nextIsTarget = false;
|
||||||
|
bool nextIsGccToolchain = false;
|
||||||
const QStringList allFlags = m_projectPart.extraCodeModelFlags + m_projectPart.compilerFlags;
|
const QStringList allFlags = m_projectPart.extraCodeModelFlags + m_projectPart.compilerFlags;
|
||||||
for (const QString &option : allFlags) {
|
for (const QString &option : allFlags) {
|
||||||
if (skipNext) {
|
if (skipNext) {
|
||||||
@@ -802,6 +803,11 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
m_explicitTarget = option;
|
m_explicitTarget = option;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (nextIsGccToolchain) {
|
||||||
|
nextIsGccToolchain = false;
|
||||||
|
m_compilerFlags.flags.append("--gcc-toolchain=" + option);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (userBlackList.contains(option))
|
if (userBlackList.contains(option))
|
||||||
continue;
|
continue;
|
||||||
@@ -833,6 +839,11 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (option == "-gcc-toolchain") {
|
||||||
|
nextIsGccToolchain = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (option == includeUserPathOption || option == includeSystemPathOption
|
if (option == includeUserPathOption || option == includeSystemPathOption
|
||||||
|| option == includeUserPathOptionWindows) {
|
|| option == includeUserPathOptionWindows) {
|
||||||
skipNext = true;
|
skipNext = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user