mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00: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>
20 lines
626 B
Bash
Executable file
20 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 "$@"
|