aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2022-01-04 11:17:11 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-22 10:18:39 +0100
commit8d02d83394a967f6ac600e7db5120fb4727acd34 (patch)
tree42cf2b9aa25789a1e1bd59470e6918005be1d681
parent03c8505f7a080b654654bbf3a05c7d3977d6762d (diff)
shiboken: Add missing g++ includes for g++ 11.3
This fixes build on conda-forge where shiboken doesn't find the type_traits header. This seems to be have been introduced by g++ 11.3. Task-number: PYSIDE-1012 Pick-to: 6.4 6.2 5.15 Change-Id: I7d8f17ba38b136a0b093001c313acf3ef5860aee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
index 4eb1a9ee8..4145c8dec 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp
@@ -344,6 +344,14 @@ QByteArrayList emulatedCompilerOptions()
case Compiler::Gpp:
if (needsClangBuiltinIncludes())
appendClangBuiltinIncludes(&headerPaths);
+
+ // Append the c++ include paths since Clang is unable to find
+ // <type_traits> etc (g++ 11.3).
+ const HeaderPaths gppPaths = gppInternalIncludePaths(compilerFromCMake(u"g++"_qs));
+ for (const HeaderPath &h : gppPaths) {
+ if (h.path.contains("c++") || h.path.contains("sysroot"))
+ headerPaths.append(h);
+ }
break;
}