File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/react-native/sdks/hermes-engine Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 44# LICENSE file in the root directory of this source tree.
55
66require "json"
7+ require "pathname"
78require_relative "./hermes-utils.rb"
89
910begin
@@ -92,8 +93,13 @@ Pod::Spec.new do |spec|
9293 "require.resolve(\" hermes-compiler\" , {paths: [\" #{ react_native_path } \" ]})" , __dir__ ] ) . strip
9394 )
9495
96+ # Compute a relative path from PODS_ROOT to avoid absolute paths with usernames that cause different checksums across developers,
97+ # and works regardless of project structure.
98+ hermesc_path = "#{ hermes_compiler_path } /hermesc/osx-bin/hermesc"
99+ relative_hermesc_path = Pathname . new ( hermesc_path ) . relative_path_from ( Pod ::Config . instance . sandbox_root )
100+
95101 spec . user_target_xcconfig = {
96- 'HERMES_CLI_PATH' => "#{ hermes_compiler_path } /hermesc/osx-bin/hermesc "
102+ 'HERMES_CLI_PATH' => "${PODS_ROOT}/ #{ relative_hermesc_path } "
97103 }
98104 end
99105
You can’t perform that action at this time.
0 commit comments