Skip to content

Commit 096422c

Browse files
Fix RNTester hermesc build issue on iOS
1 parent d33c2d1 commit 096422c

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

packages/react-native/sdks/hermes-engine/utils/build-hermesc-xcode.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@ hermesc_dir_path="$1"; shift
1010
jsi_path="$1"
1111

1212
# This script is supposed to be executed from Xcode "run script" phase.
13-
# Xcode sets up its build environment based on the build target (iphone, iphonesimulator, macodsx).
13+
# Xcode sets up its build environment based on the build target (iphone, iphonesimulator, macosx).
1414
# We want to make sure that hermesc is built for mac.
1515
# So we clean the environment with env -i, and explicitly set SDKROOT to macosx
1616
SDKROOT=$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
17-
env -i SDKROOT="$SDKROOT" "$CMAKE_BINARY" -S "${PODS_ROOT}/hermes-engine" -B "$hermesc_dir_path" -DJSI_DIR="$jsi_path"
18-
env -i SDKROOT="$SDKROOT" "$CMAKE_BINARY" --build "$hermesc_dir_path" --target hermesc -j "$(sysctl -n hw.ncpu)"
17+
18+
env -i \
19+
PATH="$PATH" \
20+
SDKROOT="$SDKROOT" \
21+
"$CMAKE_BINARY" -S "${PODS_ROOT}/hermes-engine" -B "$hermesc_dir_path" -DJSI_DIR="$jsi_path"
22+
23+
env -i \
24+
PATH="$PATH" \
25+
SDKROOT="$SDKROOT" \
26+
"$CMAKE_BINARY" --build "$hermesc_dir_path" --target hermesc -j "$(sysctl -n hw.ncpu)"

0 commit comments

Comments
 (0)