From 8d02d83394a967f6ac600e7db5120fb4727acd34 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Tue, 4 Jan 2022 11:17:11 +0100 Subject: 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 --- sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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 + // 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; } -- cgit v1.2.3