aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-08-13 13:02:40 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-08-13 13:55:39 +0000
commit3046c83f85d037d5686e625f615a1a45f675ed87 (patch)
treee63e7702e8b3975f1965c17b8e8aa8392b1b5e0c
parent1f4176275ebf05de8024ff38cde781f22d135faf (diff)
ProjectExplorer: Consider more compiler flags when collecting includes
The -nostdinc and -nostdinc++ options must not get filtered out when constructing the compiler command line for collecting include paths. Fixes: QTCREATORBUG-22760 Change-Id: I6bb10024f39869d5ef546968eb13d07d39c985ae Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index e9c683e21d..dd24b8755d 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -531,7 +531,8 @@ QStringList GccToolChain::gccPrepareArguments(const QStringList &flags,
const QString &flag = allFlags.at(i);
if (flag.startsWith("-stdlib=") || flag.startsWith("--gcc-toolchain=")
|| flag.startsWith("-B") || flag.startsWith("--target=")
- || (flag.startsWith("-isystem") && flag.length() > 8)) {
+ || (flag.startsWith("-isystem") && flag.length() > 8)
+ || flag == "-nostdinc" || flag == "-nostdinc++") {
arguments << flag;
} else if ((flag == "-target" || flag == "-gcc-toolchain" || flag == "-isystem"
|| flag == "-arch")