Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.10
-
None
Description
Our configure tests are only run for the first arch when specifying multiple CMAKE_OSX_ARCHITECTURES. As a result we are disabling Qt configure features for the secondary arch.
We've worked around this somewhat by the following logic:
qt_internal_get_first_osx_arch(__qt_osx_first_arch) set(__qt_apple_silicon_arches "arm64;arm64e") if(MACOS AND QT_IS_MACOS_UNIVERSAL AND __qt_osx_first_arch IN_LIST __qt_apple_silicon_arches) # The test in configure.cmake will not be run, but we know that # the compiler supports these intrinsics set(QT_FORCE_FEATURE_x86intrin ON CACHE INTERNAL "Force-enable x86 intrinsics due to platform requirements.") set(__QtFeature_custom_enabled_cache_variables TEST_x86intrin FEATURE_x86intrin QT_FEATURE_x86intrin) endif()if(MACOS AND QT_IS_MACOS_UNIVERSAL AND (__qt_osx_first_arch STREQUAL "x86_64" OR __qt_osx_first_arch STREQUAL "x86_64h")) set(QT_FORCE_FEATURE_neon ON CACHE INTERNAL "Force enable neon due to platform requirements.") set(__QtFeature_custom_enabled_cache_variables TEST_subarch_neon FEATURE_neon QT_FEATURE_neon) endif()
But that deals with a very limited set of features.
Switching the macOS universal build from x86_64;arm64 to arm64;x86_64 relevals the missing pieces:
https://gist.github.com/torarnv/a23feeccefa81c9e2a8e22d2d861c16c
With the current priority of x86_64;arm64 we're apparently losing out on various arm_ sub-features. If we witch, we disable a bunch of avx features.
We can hard-code all of these, but is there an option to selectively run configure tests for multi-arch, and enable the feature if one of the archs support the feature?
Attachments
Issue Links
- relates to
-
QTBUG-98240 Run configure tests for all archs in multi arch (universal) builds
-
- Reported
-