-
Task
-
Resolution: Fixed
-
P2: Important
-
6.9.0
-
None
-
-
194608527 (dev), 58c45157d (dev), 869b0d785 (dev), b72fd836f (dev), 7c9a9a426 (dev), 244b5dd5e (dev), a9479bf46 (dev), 7e1a38842 (dev), fa5e9bfd5 (dev), f9ea07b23 (dev), 3ad727140 (dev), 7acc42665 (6.9), de6f09b99 (dev), 8d0ca38ad (dev), 206cebdb7 (dev)
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.
The config keys for the type system are hardcoded in ConditionalStreamReader::platformConditions() sources/shiboken6/ApiExtractor/conditionalstreamreader.cpp:164 .
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?
References
clangd parametrization in Qt Creator: plugins/cppeditor/compileroptionsbuilder.h
- relates to
-
PYSIDE-2352 Support Qt for Python on iOS
-
- Open
-
For Gerrit Dashboard: PYSIDE-3105 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
653577,10 | WIP: Force cross compilation | dev | pyside/pyside-setup | Status: NEW | -2 | +1 |
653742,21 | WIP: Heuristics diagnostics | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |
654065,3 | WIP: Base cross diagnostics | dev | pyside/pyside-setup | Status: NEW | -2 | +1 |
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 |
652499,8 | shiboken6: Extend the platforms enumeration | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
652512,6 | Pass CMAKE_SYSTEM_NAME as platform argument to shiboken6 | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
652544,23 | Remove hard-coded Q_OS_ defines from the CMake files | dev | pyside/pyside-setup | Status: MERGED | +2 | +1 |
653428,2 | shiboken6: Fix platform comparison | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
653443,23 | shiboken6: Add architecture option | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
653576,30 | shiboken6: Pass target to clang parser when cross compiling | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
653682,12 | shiboken6: Document Cross Compilation | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
653741,21 | shiboken6: Add heuristics for cross compiling | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
653865,3 | shiboken6: Dump general log on failure in COIN | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
654041,3 | shiboken6: Enable using CMAKE_CXX_COMPILER_ID for --compiler | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
654042,18 | build system: Switch to new cross compilation support of shiboken6 | dev | pyside/pyside-setup | Status: MERGED | +2 | -1 |
654351,9 | shiboken6: Refactor host/compiler functions for triplet parsing | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
654387,9 | shiboken6: Add a triplet parser and triplet builder with test | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
654678,4 | shiboken6: Add arguments for compiler-path | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
659347,3 | shiboken6: Ensure mjb_shiboken.log is always written | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
659608,2 | shiboken6: Ensure mjb_shiboken.log is always written | 6.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
660130,3 | Fix OpenGL-Related error in iOS build | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
660143,10 | shiboken6: Add platform version to the triplet parsing | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
660173,8 | shiboken6: Add platform version option | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |