Black Lives Matter. Support the Equal Justice Initiative.

Text file misc/ios/clangwrap.sh

Documentation: misc/ios

     1#!/bin/sh
     2# This uses the latest available iOS SDK, which is recommended.
     3# To select a specific SDK, run 'xcodebuild -showsdks'
     4# to see the available SDKs and replace iphoneos with one of them.
     5SDK=iphoneos
     6SDK_PATH=`xcrun --sdk $SDK --show-sdk-path`
     7export IPHONEOS_DEPLOYMENT_TARGET=5.1
     8# cmd/cgo doesn't support llvm-gcc-4.2, so we have to use clang.
     9CLANG=`xcrun --sdk $SDK --find clang`
    10
    11if [ "$GOARCH" == "arm64" ]; then
    12	CLANGARCH="arm64"
    13else
    14	echo "unknown GOARCH=$GOARCH" >&2
    15	exit 1
    16fi
    17
    18exec $CLANG -arch $CLANGARCH -isysroot $SDK_PATH -mios-version-min=10.0 "$@"

View as plain text