aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-06-17 08:11:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-06-27 15:22:56 +0200
commit7e1a388425d6fdb2b4256106036241c5b049e532 (patch)
treed78a9a276d1356b6ad26259b9b9d525d26727cfd /sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
parent244b5dd5e1869ea85c5b78d27259965f7ca2c7bb (diff)
shiboken6: Pass target to clang parser when cross compiling
When cross compiling (detected by the platform/architecture values passed via command line not matching the host) and no custom clang command line option specifying a target is present, determine a target triplet and pass that to clang. Task-number: PYSIDE-3105 Change-Id: Ib34ecfc1880525d2e035a04079242b5ade205a7a Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
index 747937ede..fe5af06f2 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
+++ b/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp
@@ -287,7 +287,12 @@ static void setupTarget(CXTranslationUnit translationUnit)
{
QTextStream str(&message);
str << "CLANG v" << CINDEX_VERSION_MAJOR << '.' << CINDEX_VERSION_MINOR
- << " targeting \"" << targetTriple() << "\", " << pointerSize() << "bit.";
+ << " targeting \"" << targetTriple() << "\"/"
+ << clang::compilerTripletValue(clang::compiler())
+ << ", " << pointerSize() << "bit";
+ if (clang::isCrossCompilation())
+ str << ", (cross build)";
+ str << '.';
}
qCInfo(lcShiboken, "%s", qPrintable(message));
ReportHandler::addGeneralMessage(message + u'\n');