Skip to content

Commit c7f433a

Browse files
cipolleschimeta-codesync[bot]
authored andcommitted
Remove the legacy arch by default (#54894)
Summary: This change remove the legacy arch by default from React Native iOS. Users can still put the code back by using `RCT_REMOVE_LEGACY_ARCH=0 bundle exec pod install` ## Changelog: [iOS][Breaking] - Remove legacy arch by default Pull Request resolved: #54894 Test Plan: Tested with RNTester that the app build correctly. Also verified that the artifacts produced by the prebuilds are smaller than the one built before the change. Reviewed By: vzaidman Differential Revision: D89276102 Pulled By: cipolleschi fbshipit-source-id: b865311c73e4f5b5b3e0b327e065f33605782e66
1 parent 33005a4 commit c7f433a

8 files changed

Lines changed: 28 additions & 954 deletions

File tree

packages/react-native/Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@ extension Target {
923923
.define("DEBUG", .when(configuration: .debug)),
924924
.define("NDEBUG", .when(configuration: .release)),
925925
.define("USE_HERMES", to: "1"),
926+
.define("RCT_REMOVE_LEGACY_ARCH", to: "1"),
926927
] + defines + cxxCommonHeaderPaths
927928

928929
return .target(

packages/react-native/scripts/react_native_pods.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def use_react_native! (
8888
# Users can still turn them off and build from source by setting the environment variable to 0.
8989
ENV['RCT_USE_RN_DEP'] = ENV['RCT_USE_RN_DEP'] == '0' ? '0' : '1'
9090
ENV['RCT_USE_PREBUILT_RNCORE'] = ENV['RCT_USE_PREBUILT_RNCORE'] == '0' ? '0' : '1'
91+
# Make `REMOVE_LEGACY_ARCH` enabled by default. This will build React Native
92+
# excluding the legacy arch unless the user turns this flag off explicitly.
93+
ENV['RCT_REMOVE_LEGACY_ARCH'] = ENV['RCT_REMOVE_LEGACY_ARCH'] == '0' ? '0' : '1'
9194

9295
ReactNativePodsUtils.check_minimum_required_xcode()
9396

packages/rn-tester/RNTesterIntegrationTests/RCTUIManagerScenarioTests.m

Lines changed: 0 additions & 198 deletions
This file was deleted.

0 commit comments

Comments
 (0)