aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/clangparser/compilersupport.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-06-17 13:52:03 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-06-27 15:23:00 +0200
commita9479bf46e876f67a15d04e49db0e012acbc4e6c (patch)
tree515c0a1dc0e108313f2df29658d5c03fcefba138 /sources/shiboken6/ApiExtractor/clangparser/compilersupport.h
parent7e1a388425d6fdb2b4256106036241c5b049e532 (diff)
shiboken6: Add heuristics for cross compiling
If --target is present in the clang options and the relevant -platform/-arch options are not set, use the target to determine the platform. Also determine the compiler type from the path passed in. [ChangeLog][shiboken6] The support for cross compiling (using the correct target for clang-based parsing) has been improved. Task-number: PYSIDE-3105 Change-Id: If7c81b5317e0002edced1e8629318a8e66e7e1f5 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/clangparser/compilersupport.h')
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/compilersupport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.h b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.h
index e497f2df8..f2518edd7 100644
--- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.h
+++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.h
@@ -80,6 +80,10 @@ bool isCrossCompilation();
// Are there any options specifying a target
bool hasTargetOption(const QByteArrayList &clangOptions);
+// Unless the platform/architecture/compiler options were set, try to find
+// values based on a --target option in clangOptions and the compiler path.
+void setHeuristicOptions(const QByteArrayList &clangOptions);
+
// Parse a triplet "x86_64-unknown-linux-gnu" (for testing). Note the
// compiler might not be present and defaults to host
bool parseTriplet(QStringView name, Architecture *a, Platform *p, Compiler *c);