summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-12-20 10:07:05 -0800
committerThiago Macieira <thiago.macieira@intel.com>2022-06-27 20:28:41 -0700
commit500c116ced9ab8d9dbcf4d71aeb150b5cda54a0d (patch)
tree7cb5a6b3004d165c615cae6f1d19ed1957ff9f6f
parentdedf11a53b664c6901dd8d9656e6d7e1fb051974 (diff)
CMake: disable the attempt to force SIMD on iOS simulator builds
This will stop working with the next commit, which merges all basic x86 SIMD intrinsics into one configure test. As a result, linking almost anything graphical on iOS (which is almost everything) causes the linker to fail with undefined references to SIMD-optimized versions that didn't get compiled. Change-Id: Ib42b3adc93bf4d43bd55fffd16c288f4104a6ccc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--cmake/QtBaseGlobalTargets.cmake7
-rw-r--r--cmake/QtInternalTargets.cmake9
-rw-r--r--mkspecs/features/uikit/default_pre.prf9
3 files changed, 4 insertions, 21 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index a81c6cbcfc..cec440dd91 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -87,9 +87,10 @@ include("${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake")
qt_internal_get_first_osx_arch(__qt_osx_first_arch)
set(__qt_apple_silicon_arches "arm64;arm64e")
-if((UIKIT AND NOT QT_UIKIT_SDK)
- OR (MACOS AND QT_IS_MACOS_UNIVERSAL
- AND __qt_osx_first_arch IN_LIST __qt_apple_silicon_arches))
+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_sse2 ON CACHE INTERNAL "Force enable sse2 due to platform requirements.")
set(__QtFeature_custom_enabled_cache_variables
TEST_subarch_sse2
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index e707a2a91c..bf7ef3cf36 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -214,15 +214,6 @@ if(MSVC)
endif()
if(UIKIT)
- # Do what mkspecs/features/uikit/default_pre.prf does, aka enable sse2 for
- # simulator_and_device_builds.
- if(FEATURE_simulator_and_device)
- # Setting the definition on PlatformCommonInternal behaves slightly differently from what
- # is done in qmake land. This way the define is not propagated to tests, examples, or
- # user projects built with qmake, but only modules, plugins and tools.
- # TODO: Figure out if this ok or not (sounds ok to me).
- target_compile_definitions(PlatformCommonInternal INTERFACE QT_COMPILER_SUPPORTS_SSE2)
- endif()
qt_internal_apply_bitcode_flags(PlatformCommonInternal)
endif()
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
index bc72936520..4a7c0820d0 100644
--- a/mkspecs/features/uikit/default_pre.prf
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -7,15 +7,6 @@ $$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${device.sdk}.*): \
$$sim_and_dev|contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
CONFIG += simulator $${simulator.sdk}
-$$sim_and_dev {
- # For a simulator_and_device build all the config tests
- # are based on the device's ARM SDK, but we know that the simulator
- # is Intel and that we support SSE/SSE2.
- QT_CPU_FEATURES.$$QT_ARCH += sse sse2
- CONFIG += sse sse2
- DEFINES += QT_COMPILER_SUPPORTS_SSE2
-}
-
CONFIG += entrypoint
unset(sim_and_dev)