Skip to content

Commit

Permalink
misc/ios: add to README how to build ios executables
Browse files Browse the repository at this point in the history
Updates #43371, #43343.

Change-Id: I19386269245f2c20345c6cac7560089b8223e9f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/280153
Trust: Cherry Zhang <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
cherrymui committed Dec 29, 2020
1 parent 4fd9455 commit f83e0f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions misc/ios/README
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ set to the clang wrapper that invokes clang for iOS. For example, this command r

GOOS=ios GOARCH=amd64 CGO_ENABLED=1 CC_FOR_TARGET=$(pwd)/../misc/ios/clangwrap.sh ./all.bash

If CC_FOR_TARGET is not set when the toolchain is built (make.bash or all.bash), CC
can be set at commond line. For example,

GOOS=ios GOARCH=amd64 CGO_ENABLED=1 CC=$(go env GOROOT)/misc/ios/clangwrap.sh go build

Setting CC is not necessary if the toolchain is built with CC_FOR_TARGET set.

To use the go tool to run individual programs and tests, put $GOROOT/bin into PATH to ensure
the go_ios_$GOARCH_exec wrapper is found. For example, to run the archive/tar tests:

Expand Down

0 comments on commit f83e0f6

Please sign in to comment.