Skip to content

Commit

Permalink
Fix use_hermes condition in React-Core (#39262)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #39262

The use_hermes condition in React core was imprecise as using hermes is the default now. So, if USE_HERMES is not defined, then we are using hermes.

## Changelog:
[iOS][Fixed] - Use the right condition in React-Core for USE_HERMES.

Reviewed By: dmytrorykun

Differential Revision: D48907854

fbshipit-source-id: daeaa1782f23e0ab3992240e70f49ff0b2fd75de
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Sep 5, 2023
1 parent 89dfc08 commit 735f4ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/react-native/React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ folly_version = '2021.07.22.00'
socket_rocket_version = '0.6.0'
boost_compiler_flags = '-Wno-documentation'

use_hermes = ENV['USE_HERMES'] == '1'
use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
use_frameworks = ENV['USE_FRAMEWORKS'] != nil

header_subspecs = {
Expand Down Expand Up @@ -95,7 +95,7 @@ Pod::Spec.new do |s|
]
# If we are using Hermes (the default is use hermes, so USE_HERMES can be nil), we don't have jsc installed
# So we have to exclude the JSCExecutorFactory
if ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1"
if use_hermes
exclude_files = exclude_files.append("React/CxxBridge/JSCExecutorFactory.{h,mm}")
end
ss.exclude_files = exclude_files
Expand Down Expand Up @@ -136,10 +136,10 @@ Pod::Spec.new do |s|
s.dependency "Yoga"
s.dependency "glog"

if ENV['USE_HERMES'] == "0"
s.dependency 'React-jsc'
else
if use_hermes
s.dependency 'React-hermes'
s.dependency 'hermes-engine'
else
s.dependency 'React-jsc'
end
end

0 comments on commit 735f4ed

Please sign in to comment.