Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/react-native/scripts/xcode/ccache-clang++.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@ REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
# Provide our config file if none is already provided
export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"

exec $CCACHE_BINARY clang++ "$@"
# Xcode does not export user-defined build settings as environment variables
# for invoked scripts, so $CCACHE_BINARY may be empty even when set in the
# project. Fall back to a PATH lookup so ccache is still used.
CCACHE_BINARY="${CCACHE_BINARY:-$(command -v ccache)}"

if [ -n "$CCACHE_BINARY" ]; then
exec "$CCACHE_BINARY" clang++ "$@"
fi

exec clang++ "$@"
11 changes: 10 additions & 1 deletion packages/react-native/scripts/xcode/ccache-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@ REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
# Provide our config file if none is already provided
export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"

exec $CCACHE_BINARY clang "$@"
# Xcode does not export user-defined build settings as environment variables
# for invoked scripts, so $CCACHE_BINARY may be empty even when set in the
# project. Fall back to a PATH lookup so ccache is still used.
CCACHE_BINARY="${CCACHE_BINARY:-$(command -v ccache)}"

if [ -n "$CCACHE_BINARY" ]; then
exec "$CCACHE_BINARY" clang "$@"
fi

exec clang "$@"