Skip to content

Commit 12ad1ff

Browse files
hramosfacebook-github-bot
authored andcommitted
Build Hermes from source by default on iOS
Summary: Remove BUILD_HERMES_SOURCE gate and default to building Hermes from source on iOS when Hermes is enabled. Changelog: [iOS][Changed] - When Hermes is enabled, the Hermes Engine will be built from source instead of using the pre-built `hermes-engine` CocoaPod. Reviewed By: cortinico Differential Revision: D34911987 fbshipit-source-id: 9d6d49498a23f6dae0b97c9f80c689b654db11bd
1 parent 3c2ce29 commit 12ad1ff

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

packages/rn-tester/Podfile.lock

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ PODS:
9494
- RCTRequired (1000.0.0)
9595
- RCTTypeSafety (1000.0.0):
9696
- FBLazyVector (= 1000.0.0)
97-
- RCT-Folly (= 2021.06.28.00-v2)
9897
- RCTRequired (= 1000.0.0)
9998
- React-Core (= 1000.0.0)
10099
- React (1000.0.0):
@@ -908,7 +907,7 @@ SPEC CHECKSUMS:
908907
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
909908
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
910909
RCTRequired: 1c8808cf84569265784a6c33984bbb506ada8c6e
911-
RCTTypeSafety: b9e639380265155a5bbdac4a72be1307f9360fc6
910+
RCTTypeSafety: b6dcb5036a808864ee8cad66ca15f263c24661cc
912911
React: 8d809d414723bb5763093ddec7658066a21ccabc
913912
React-bridging: 1329cdc45834252447f5f4cb8bd19ec78ef0f06e
914913
React-callinvoker: 5f16202ad4e45f0607b1fae0f6955a8f7c87eef1

scripts/react_native_pods.rb

+2-21
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,8 @@ def use_react_native! (options={})
110110

111111
if hermes_enabled
112112
pod 'React-hermes', :path => "#{prefix}/ReactCommon/hermes"
113-
114-
if ENV['BUILD_HERMES_SOURCE'] == '1'
115-
hermes_source_path = downloadAndConfigureHermesSource(prefix)
116-
pod 'hermes-engine', :path => "#{hermes_source_path}/hermes-engine.podspec"
117-
else
118-
pod 'hermes-engine', '~> 0.11.0'
119-
end
113+
hermes_source_path = downloadAndConfigureHermesSource(prefix)
114+
pod 'hermes-engine', :path => "#{hermes_source_path}/hermes-engine.podspec"
120115
pod 'libevent', '~> 2.1.12'
121116
end
122117

@@ -677,20 +672,6 @@ def downloadAndConfigureHermesSource(react_native_path)
677672
hermes_dir
678673
end
679674

680-
def locatePathToHermesSource!(react_native_path)
681-
return if ENV['BUILD_HERMES_SOURCE'] != '1'
682-
683-
hermes_source_path = "#{react_native_path}/sdks/hermes"
684-
685-
if !File.exist?(hermes_source_path)
686-
Pod::UI.warn "[Hermes] Error: Hermes source code must be present at #{hermes_source_path} when BUILD_HERMES_SOURCE is enabled."
687-
Pod::UI.warn '[Hermes] Verify that the release of React Native that you are using has the Hermes source code included.'
688-
exit 1
689-
end
690-
691-
hermes_source_path
692-
end
693-
694675
# This provides a post_install workaround for build issues related Xcode 12.5 and Apple Silicon (M1) machines.
695676
# Call this in the app's main Podfile's post_install hook.
696677
# See https://github.com/facebook/react-native/issues/31480#issuecomment-902912841 for more context.

0 commit comments

Comments
 (0)