Skip to content

Commit

Permalink
Remove fallback for SDKROOT as all users of this script are setting t…
Browse files Browse the repository at this point in the history
…he environment properly.

PiperOrigin-RevId: 204738902
  • Loading branch information
sergiocampama authored and Copybara-Service committed Jul 16, 2018
1 parent 020ac7e commit d69b1c7
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions tools/objc/xcrunwrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,11 @@ if [[ -z "${WRAPPER_DEVDIR}" ]] ; then
WRAPPER_DEVDIR="$(xcode-select -p)"
fi

# TODO(blaze-team): Remove this once all build environments are setting SDKROOT
# for us.
WRAPPER_SDKROOT="${SDKROOT:-}"
if [[ -z "${WRAPPER_SDKROOT:-}" ]] ; then
WRAPPER_SDK=iphonesimulator
for ARG in "$@" ; do
case "${ARG}" in
armv6|armv7|armv7s|arm64)
WRAPPER_SDK=iphoneos
;;
i386|x86_64)
WRAPPER_SDK=iphonesimulator
;;
esac
done
WRAPPER_SDKROOT="$(/usr/bin/xcrun --show-sdk-path --sdk ${WRAPPER_SDK})"
fi

# Subsitute toolkit path placeholders.
UPDATEDARGS=()
for ARG in "$@" ; do
ARG="${ARG//__BAZEL_XCODE_DEVELOPER_DIR__/${WRAPPER_DEVDIR}}"
ARG="${ARG//__BAZEL_XCODE_SDKROOT__/${WRAPPER_SDKROOT}}"
ARG="${ARG//__BAZEL_XCODE_SDKROOT__/${SDKROOT}}"
UPDATEDARGS+=("${ARG}")
done

Expand Down

0 comments on commit d69b1c7

Please sign in to comment.