aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-09 08:05:00 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-09 08:24:26 +0000
commita6bd54e3a51654dfe2ad057205ff9f2a51125fd0 (patch)
tree25765c448cb348e12d3a83ee0cc43ab764fdcfb6
parent13bef9d3e2fcb743c6fb8201987ff729dd8d9f56 (diff)
Exclude Qt header qsimd.h by include guard
It is causing problems with libclang on macOS. Change-Id: I5d55810b3ea3e2eb4028f09d2ce6e97ba93d48a9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken6/ApiExtractor/apiextractor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/apiextractor.cpp b/sources/shiboken6/ApiExtractor/apiextractor.cpp
index 5e9d18729..bfae4cbc0 100644
--- a/sources/shiboken6/ApiExtractor/apiextractor.cpp
+++ b/sources/shiboken6/ApiExtractor/apiextractor.cpp
@@ -185,6 +185,11 @@ static void addPySideExtensions(QByteArrayList *a)
// annotating nothing, causing clang to complain. Instead, define it away in a
// static assert with the stringified argument in a ','-operator (cf qdoc).
a->append(QByteArrayLiteral("-DQT_ANNOTATE_CLASS(type,...)=static_assert(sizeof(#__VA_ARGS__),#type);"));
+
+ // With Qt6, qsimd.h became public header and was included in <QtCore>. That
+ // introduced a conflict with libclang headers on macOS. To be able to include
+ // <QtCore>, we prevent its inclusion by adding its include guard.
+ a->append(QByteArrayLiteral("-DQSIMD_H"));
}
bool ApiExtractor::run(bool usePySideExtensions)