Skip to content

Commit

Permalink
chore: fall back to which gcc to identify compiler when xcrun not…
Browse files Browse the repository at this point in the history
… available
  • Loading branch information
legobeat committed May 5, 2024
1 parent 83a678c commit 9a2400e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-native/scripts/ios-configure-glog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ EOF
patch -p1 config.sub fix_glog_0.3.5_apple_silicon.patch
fi

XCRUN="$(which xcrun)"
if [ -z "$XCRUN" ]; then
export CC="$(which gcc)"
fi
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"

Expand Down

0 comments on commit 9a2400e

Please sign in to comment.