Build shared JSI by default (#41037)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41037

Build JSI as a shared library by default. This avoids running into a
problem with duplicate JSI when building against `libhermes` as a
shared library. This is already the case for React Native on Android.

For RN's iOS builds, explicitly specify that JSI should be statically
linked.

Changelog: [Internal]

Reviewed By: dannysu

Differential Revision: D50294405

fbshipit-source-id: 5e77e6d4ab77f8e338ca5ca4154e879eb3d616d7
This commit is contained in:
Neil Dhar
2023-11-14 12:34:19 -08:00
committed by Facebook GitHub Bot
parent 6c4cb02e27
commit 255fef5263
2 changed files with 2 additions and 0 deletions
@@ -86,6 +86,7 @@ function configure_apple_framework {
-DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false \
-DHERMES_ENABLE_BITCODE:BOOLEAN=false \
-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
-DHERMES_BUILD_SHARED_JSI:BOOLEAN=false \
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
-DIMPORT_HERMESC:PATH="$IMPORT_HERMESC_PATH" \
-DJSI_DIR="$JSI_PATH" \
@@ -71,6 +71,7 @@ echo "Configure Apple framework"
-DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false \
-DHERMES_ENABLE_BITCODE:BOOLEAN=false \
-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
-DHERMES_BUILD_SHARED_JSI:BOOLEAN=false \
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
-DIMPORT_HERMESC:PATH="${hermesc_path}" \
-DJSI_DIR="$jsi_path" \