diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-07-12 15:56:47 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2022-08-05 09:56:06 +0000 |
commit | a93263f62ef7f9b425572daf679dbed624cb858a (patch) | |
tree | 5e278af39e63e7d77bd6465381dc6df69a563a7d | |
parent | b71cd7e93dc182a87777a76776ed159a01ec8e36 (diff) |
Explicitly disable bitcode for iOS applications
We disabled building Qt with bitcode in e27a0d5a0f8818653ff125409db81,
but the default in Xcode 13 is still to build applications with bitcode,
leading to build issues when built against a non-bitcode-enabled Qt.
For qmake we already explicitly disable bitcode, so do the same for
CMake.
Change-Id: I3fd542373c3e1326eb1088a173e70955e61ff608
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1d6ce38a826a7ee18165b4994175c1d5479fd90f)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index f51e5847b4..9e0cd1fc66 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1105,12 +1105,32 @@ function(_qt_internal_set_xcode_bundle_display_name target) set(QT_INTERNAL_DOLLAR_VAR "$" CACHE STRING "") endfunction() +function(_qt_internal_set_xcode_bitcode_enablement target) + if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE + OR QT_NO_SET_XCODE_ENABLE_BITCODE) + return() + endif() + + get_target_property(existing_bitcode_enablement + "${target}" XCODE_ATTRIBUTE_ENABLE_BITCODE) + if(NOT existing_bitcode_enablement MATCHES "-NOTFOUND") + return() + endif() + + # Disable bitcode to match Xcode 14's new default + set_target_properties("${target}" + PROPERTIES + XCODE_ATTRIBUTE_ENABLE_BITCODE + "NO") +endfunction() + function(_qt_internal_finalize_ios_app target) _qt_internal_set_xcode_development_team_id("${target}") _qt_internal_set_xcode_bundle_identifier("${target}") _qt_internal_set_xcode_targeted_device_family("${target}") _qt_internal_set_xcode_code_sign_style("${target}") _qt_internal_set_xcode_bundle_display_name("${target}") + _qt_internal_set_xcode_bitcode_enablement("${target}") _qt_internal_handle_ios_launch_screen("${target}") _qt_internal_set_placeholder_apple_bundle_version("${target}") |