cmd/gomobile: use new -pkgdir flag

The go command now has a -pkgdir flag, which specifies a directory
for all install output, including the standard library. Use it to
build the mobile compilers under $GOMOBILE, so that targets like
the iOS simulator (darwin/386) do not conflict with system targets.
The result is we no longer need GOROOT to be writable.

The iOS simulator now works with gomobile bind.

Fixes golang/go#11342.

Change-Id: I0bc6378e0cb82e3175b2a1efe355e3ce39533649
Reviewed-on: https://go-review.googlesource.com/12303
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
5 files changed
tree: f1860211505720e34a4aa93c1de92848b71e948a
  1. app/
  2. asset/
  3. bind/
  4. cmd/
  5. event/
  6. example/
  7. exp/
  8. geom/
  9. gl/
  10. internal/
  11. testdata/
  12. .gitattributes
  13. .gitignore
  14. AUTHORS
  15. codereview.cfg
  16. CONTRIBUTING.md
  17. CONTRIBUTORS
  18. LICENSE
  19. PATENTS
  20. README.md
README.md

Go support for Mobile devices

The Go mobile repository holds packages and build tools for using Go on Android.

This is early work and installing the build system requires Go 1.5. Follow the build instructions on godoc.org/golang.org/x/mobile/cmd/gomobile to install the gomobile command and build the basic example.


APIs are currently very limited, but under active development. Package documentation serves as a starting point:


Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.