Skip to content

Commit 4cf2b02

Browse files
misc/ios: rework exec wrapper to only support simulator
This updates the tools used to execute Go binaries on the Apple iOS Simulator to (a) work with newer arm64 macOS, (b) remove support for running binaries on physical devices, and (c) remove the reliance on LLDB and third-party Python packages. This makes the wrapper somewhat simpler, and easier to understand and maintain. Additionally clangwrap.sh is updated to reflect dropping support for targeting physical devices. This smoothes out the path for #66360. Change-Id: I769127e65f5e8c6c727841168890fd8557fb0e1d Reviewed-on: https://go-review.googlesource.com/c/go/+/573175 Reviewed-by: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent e44fa1c commit 4cf2b02

File tree

2 files changed

+23
-565
lines changed

2 files changed

+23
-565
lines changed

misc/ios/clangwrap.sh

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/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.
2+
3+
# This script configures clang to target the iOS simulator. If you'd like to
4+
# build for real iOS devices, change SDK to "iphoneos" and PLATFORM to "ios".
5+
# This uses the latest available iOS SDK, which is recommended. To select a
6+
# specific SDK, run 'xcodebuild -showsdks' to see the available SDKs and replace
7+
# iphonesimulator with one of them.
8+
9+
SDK=iphonesimulator
10+
PLATFORM=ios-simulator
11+
512
if [ "$GOARCH" == "arm64" ]; then
6-
SDK=iphoneos
7-
PLATFORM=ios
813
CLANGARCH="arm64"
914
else
10-
SDK=iphonesimulator
11-
PLATFORM=ios-simulator
1215
CLANGARCH="x86_64"
1316
fi
1417

1518
SDK_PATH=`xcrun --sdk $SDK --show-sdk-path`
16-
export IPHONEOS_DEPLOYMENT_TARGET=5.1
19+
1720
# cmd/cgo doesn't support llvm-gcc-4.2, so we have to use clang.
1821
CLANG=`xcrun --sdk $SDK --find clang`
1922

0 commit comments

Comments
 (0)