mirror of
https://github.com/golang/go
synced 2024-11-17 06:44:42 -07:00
36be0beb05
For #48076 Change-Id: I5edaa43af82c3478555c309a001a3d1b16de3d64 Reviewed-on: https://go-review.googlesource.com/c/go/+/368615 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
21 lines
626 B
Bash
Executable File
21 lines
626 B
Bash
Executable File
#!/bin/sh
|
|
# This uses the latest available iOS SDK, which is recommended.
|
|
# To select a specific SDK, run 'xcodebuild -showsdks'
|
|
# to see the available SDKs and replace iphoneos with one of them.
|
|
if [ "$GOARCH" == "arm64" ]; then
|
|
SDK=iphoneos
|
|
PLATFORM=ios
|
|
CLANGARCH="arm64"
|
|
else
|
|
SDK=iphonesimulator
|
|
PLATFORM=ios-simulator
|
|
CLANGARCH="x86_64"
|
|
fi
|
|
|
|
SDK_PATH=`xcrun --sdk $SDK --show-sdk-path`
|
|
export IPHONEOS_DEPLOYMENT_TARGET=5.1
|
|
# cmd/cgo doesn't support llvm-gcc-4.2, so we have to use clang.
|
|
CLANG=`xcrun --sdk $SDK --find clang`
|
|
|
|
exec "$CLANG" -arch $CLANGARCH -isysroot "$SDK_PATH" -m${PLATFORM}-version-min=12.0 "$@"
|