Skip to content

Commit

Permalink
Fix Hermes build on folly 2021.04.26.00
Browse files Browse the repository at this point in the history
Summary:
This fixes multiple compile errors when building RNTester with Hermes enabled:
- `Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')`
- `'event2/event-config.h' file not found`
- tons of missing files (all added to RCT-Folly/Futures)

Changelog: [iOS] Fix Hermes build on folly version 2021.04.26.00
allow-large-files

Reviewed By: RSNara

Differential Revision: D28128087

fbshipit-source-id: ee7cb6fda72d00d22f6182d958aa8ba55939f158
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Apr 30, 2021
1 parent 7579ed3 commit 8eceee7
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 70 deletions.
6 changes: 3 additions & 3 deletions ReactCommon/hermes/React-hermes.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ else
source[:tag] = "v#{version}"
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'

Expand All @@ -36,7 +36,7 @@ Pod::Spec.new do |s|
s.public_header_files = "executor/HermesExecutorFactory.h"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"",
"GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1",
}
s.header_dir = "reacthermes"
Expand All @@ -46,8 +46,8 @@ Pod::Spec.new do |s|
s.dependency "React-jsinspector", version
s.dependency "React-perflogger", version
s.dependency "RCT-Folly", folly_version
s.dependency "RCT-Folly/Futures", folly_version
s.dependency "DoubleConversion"
s.dependency "glog"
s.dependency "RCT-Folly/Futures", folly_version
s.dependency "hermes-engine"
end
2 changes: 1 addition & 1 deletion packages/rn-tester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ SPEC CHECKSUMS:
glog: 5337263514dd6f09803962437687240c5dc39aa4
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
RCT-Folly: ed150a9621ca98972042998fa33bdfed325c2801
RCT-Folly: c2df3efe85970e635de36ef663ce1e98a1c84981
RCTRequired: af2d6080a4b9ba0885b28ca78879a92066c71cab
RCTTypeSafety: f5405e0143bb2addae97ce33e4c87d9284a48fe2
React: f64c9f6db5428717922a3292ba6a448615a2e143
Expand Down
Loading

0 comments on commit 8eceee7

Please sign in to comment.