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:
parent
e2a9091da2
commit
b84795b494
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue