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: cortinico, cipolleschi

Differential Revision: D36567471

fbshipit-source-id: 97d954ef34007bd31f008fab451512194060d670
  • Loading branch information
hramos authored and facebook-github-bot committed Jun 9, 2022
1 parent df80ed4 commit 340612a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,6 @@ jobs:
name: Set HERMES_ENGINE_TARBALL_PATH
command: |
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
- run:
name: Set RCT_VERBOSE_POD_INSTALL=1
command: echo "export RCT_VERBOSE_POD_INSTALL=1" >> $BASH_ENV
- run:
name: Create iOS template project
command: |
Expand Down
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 340612a

Please sign in to comment.