aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/gcctoolchain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/projectexplorer/gcctoolchain.cpp')
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 1753674999..48b00f3ef8 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -525,6 +525,7 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
filtered << a << allFlags.at(i);
} else if (a == "-Xclang") {
filtered << a;
+ continue;
} else if ((considerSysroot && (a == "--sysroot" || a == "-isysroot"))
|| a == "-D" || a == "-U"
|| a == "-gcc-toolchain" || a == "-target" || a == "-mllvm" || a == "-isystem") {
@@ -541,6 +542,8 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
|| a == "-nostdinc" || a == "-nostdinc++") {
filtered << a;
}
+ if (!filtered.isEmpty() && filtered.last() == "-Xclang")
+ filtered.removeLast();
}
return filtered;
}