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.
     5if [ "$GOARCH" == "arm64" ]; then
     6	SDK=iphoneos
     7	PLATFORM=ios
     8	CLANGARCH="arm64"
     9else
    10	SDK=iphonesimulator
    11	PLATFORM=ios-simulator
    12	CLANGARCH="x86_64"
    13fi
    14
    15SDK_PATH=`xcrun --sdk $SDK --show-sdk-path`
    16export IPHONEOS_DEPLOYMENT_TARGET=5.1
    17# cmd/cgo doesn't support llvm-gcc-4.2, so we have to use clang.
    18CLANG=`xcrun --sdk $SDK --find clang`
    19
    20exec "$CLANG" -arch $CLANGARCH -isysroot "$SDK_PATH" -m${PLATFORM}-version-min=10.0 "$@"

View as plain text