cmd/gomobile: avoid -buildmode for go install std

Turns out that go install -buildmode=c-shared std does nothing. The go
tool filters all non-main packages from c-shared builds, which for the
standard library is all packages.

This may be a bug in the go tool. I'm not sure yet. But either way, to
make the gomobile tool work with Go 1.5, work around it here.

Change-Id: Ica1e7eeb0f40a21a2c78b0c55bdc54f133a32ee5
Reviewed-on: https://go-review.googlesource.com/16912
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
David Crawshaw 2015-11-13 13:54:19 -05:00
parent e2a9091da2
commit b84795b494
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ func runInit(cmd *command) error {
// Install standard libraries for cross compilers.
start := time.Now()
if err := installStd(androidArmEnv, "-buildmode=c-shared"); err != nil {
if err := installStd(androidArmEnv, "-gcflags=-shared", "-ldflags=-shared"); err != nil {
return err
}
if err := installDarwin(); err != nil {