Skip to content

Commit 473d292

Browse files
committed
Fix HermesV1 build from source in CI
1 parent 8448f09 commit 473d292

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/react-native/sdks/hermes-engine/hermes-engine.podspec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ Pod::Spec.new do |spec|
6969

7070
spec.subspec 'Pre-built' do |ss|
7171
ss.preserve_paths = ["destroot/bin/*"].concat(["**/*.{h,c,cpp}"])
72-
ss.source_files = "destroot/include/hermes/**/*.h"
72+
if ENV["RCT_HERMES_V1_ENABLED"] == "0"
73+
ss.source_files = "destroot/include/hermes/**/*.h"
74+
else
75+
# Hermes v1 is shipping a jsi/hermes.h header which is imported by the hermes.h header
76+
# and that file is not present in React Native's JSI
77+
# (see https://github.com/facebook/react-native/tree/main/packages/react-native/ReactCommon/jsi/jsi/ where there is
78+
# hermes-interface.h but not hermes.h)
79+
ss.source_files = ["destroot/include/hermes/**/*.h", "destroot/include/jsi/hermes.h"]
80+
end
7381
ss.header_mappings_dir = "destroot/include"
7482
ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermesvm.xcframework"
7583
ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermesvm.xcframework"

0 commit comments

Comments
 (0)