From 5e74fe48ed36fdeea656a082475bd6e94e121a3f Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Fri, 23 Sep 2022 19:14:37 +0100 Subject: [PATCH] fix: Add support for JSI_PATH env var --- sdks/hermes-engine/hermes-engine.podspec | 5 +++-- sdks/hermes-engine/utils/build-apple-framework.sh | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sdks/hermes-engine/hermes-engine.podspec b/sdks/hermes-engine/hermes-engine.podspec index 4b6b65b0e52a61..54acee6ab300c6 100644 --- a/sdks/hermes-engine/hermes-engine.podspec +++ b/sdks/hermes-engine/hermes-engine.podspec @@ -77,8 +77,9 @@ Pod::Spec.new do |spec| export RELEASE_VERSION="#{version}" export IOS_DEPLOYMENT_TARGET="#{spec.deployment_target('ios')}" export MAC_DEPLOYMENT_TARGET="#{spec.deployment_target('osx')}" - - export BUILD_TYPE=#{HermesHelper::BUILD_TYPE == :debug ? "Debug" : "Release"} + export JSI_PATH="#{react_native_path}/ReactCommon/jsi" + echo ">>> hermes-engine.podspec ${JSI_PATH}" + export BUILD_TYPE=#{HermesHelper::BUILD_TYPE.to_s.capitalize} # Set HERMES_OVERRIDE_HERMESC_PATH if pre-built HermesC is available #{File.exist?(import_hermesc_file) ? "export HERMES_OVERRIDE_HERMESC_PATH=#{import_hermesc_file}" : ""} diff --git a/sdks/hermes-engine/utils/build-apple-framework.sh b/sdks/hermes-engine/utils/build-apple-framework.sh index c169347c1c5e4c..aab43ade6d2f25 100755 --- a/sdks/hermes-engine/utils/build-apple-framework.sh +++ b/sdks/hermes-engine/utils/build-apple-framework.sh @@ -7,7 +7,9 @@ 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" +if [[ -z JSI_PATH ]]; then + JSI_PATH="$REACT_NATIVE_PATH/ReactCommon/jsi" +fi function use_env_var_or_ruby_prop { if [[ -n "$1" ]]; then @@ -55,7 +57,7 @@ function configure_apple_framework { else enable_debugger="false" fi - + echo ">>> $JSI_PATH" cmake -S . -B "build_$1" \ -DHERMES_APPLE_TARGET_PLATFORM:STRING="$1" \ -DCMAKE_OSX_ARCHITECTURES:STRING="$2" \