Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9.0
-
None
-
-
14699b3ba (dev), 5587fe5f0 (dev), 8115effa6 (6.9), 74e657a11 (6.9)
Description
Shiboken generator
Currently, shiboken is not aware of cross builds. The code sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp detects the compiler from Clang, but does not otherwise know the target platform. Some parameters to the clang parser (system include paths/gl headers sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp:815 ) are set depending on the compiler, but may also need adaption to a target platform.
The Android build passes the target as clang option --target=..., this can be used to obtain
the platform triple and pointer size via libclang API.
PySide
Unrelated to shiboken, various ENABLE_MAC/ENABLE_WIN variables are set in CMake at sources/pyside6/cmake/PySideHelpers.cmake:143 that affect sources/pyside6/PySide6/global.h.in which defines the Q_OS_XX defines.
For Android, tools/cross_compile_android/templates/toolchain_default.tmpl.cmake has "add_compile_definitions(ANDROID)". This should cause Q_OS_ANDROID to be set by
qtbase/src/corelib/global/qsystemdetection.h .
Q_OS_MAC is incorrectly set for iOS, causing missing symbols.
Plans
Shiboken generator should know the target platform via libclang API and can then set clang parameters accordingly.
It could also set the Q_OS_XX defines based on that (when PySide extensions are enabled)? Or set defines for qtbase/src/corelib/global/qsystemdetection.h to work?
Attachments
Issue Links
- relates to
-
PYSIDE-2352 Support Qt for Python on iOS
-
- Open
-
Gerrit Reviews
For Gerrit Dashboard: PYSIDE-3105 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
646189,6 | shiboken6: Determine the target platform | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
646190,6 | shiboken6: Improve message output of compiler support | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
647521,2 | shiboken6: Determine the target platform | 6.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
647522,2 | shiboken6: Improve message output of compiler support | 6.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |