Skip to content

Commit

Permalink
Hermes: Use shared JSI from React Native on iOS (facebook#33885)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#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

Differential Revision: D36567471

fbshipit-source-id: a0626aa3cf370a15bea7533231b189a332f538b2
  • Loading branch information
hramos authored and facebook-github-bot committed May 21, 2022
1 parent bc7b5c3 commit 3cde969
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,7 @@ fi

NUM_CORES=$(sysctl -n hw.ncpu)
IMPORT_HERMESC_PATH=${HERMES_OVERRIDE_HERMESC_PATH:-$PWD/build_host_hermesc/ImportHermesc.cmake}
JSI_PATH="$PWD/../../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 +60,9 @@ 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_BUILD_SHARED_JSI=true \
-DHERMES_RELEASE_VERSION="for RN $(get_release_version)" \
-DCMAKE_INSTALL_PREFIX:PATH=../destroot \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
}
Expand Down

0 comments on commit 3cde969

Please sign in to comment.