Skip to content

Commit

Permalink
Hermes: Use shared JSI from React Native on iOS (#33885)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #33885

When building Hermes for React Native, point to the React Native JSI location to ensure both React Native and Hermes use the exact same version of JSI.

Changelog:
[iOS] [Changed] - When Hermes is enabled, it will use the same copy of JSI as React Native

Reviewed By: cipolleschi

Differential Revision: D36567471

fbshipit-source-id: d0eb559aba603a0848a8b5474fbe01ce3ad103ff
  • Loading branch information
hramos authored and facebook-github-bot committed Jun 8, 2022
1 parent eb09611 commit 3b3078b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdks/hermes-engine/utils/build-apple-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fi

NUM_CORES=$(sysctl -n hw.ncpu)
IMPORT_HERMESC_PATH=${HERMES_OVERRIDE_HERMESC_PATH:-$PWD/build_host_hermesc/ImportHermesc.cmake}
REACT_NATIVE_PATH=${REACT_NATIVE_PATH:-$PWD/../..}
JSI_PATH="$REACT_NATIVE_PATH/ReactCommon/jsi"

function get_release_version {
ruby -rcocoapods-core -rjson -e "puts Pod::Specification.from_file('hermes-engine.podspec').version"
Expand Down Expand Up @@ -59,6 +61,8 @@ function configure_apple_framework {
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
-DHERMES_ENABLE_TOOLS:BOOLEAN="$build_cli_tools" \
-DIMPORT_HERMESC:PATH="$IMPORT_HERMESC_PATH" \
-DJSI_DIR="$JSI_PATH" \
-DHERMES_RELEASE_VERSION="for RN $(get_release_version)" \
-DCMAKE_INSTALL_PREFIX:PATH=../destroot \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
}
Expand Down

0 comments on commit 3b3078b

Please sign in to comment.