Commit Graph

15 Commits

Author SHA1 Message Date
David Crawshaw 743b9bfd9a cmd/gomobile: simplify init
The Go toolchain used to require that we rebuild the compiler and
friends (the cgo command) when building a cgo-enabled cross compiler.
This meant that gomobile init used to invoke make.bash in a temporary
copy of the GOROOT. This works, but brings with it several
complications, including needing to use -toolexec when invoking the
go tool, finding a boostrap copy of Go 1.4, long initialization
times, and a variety of unusual failure modes.

Fortunately we don't need our own compiler any more. All that's
necessary is building the standard library for the cross-compilation
targets and making sure the right C compiler is used when calling
go build (as it always was). This means most of the initialization
process can be replaced with a carefully invoked 'go install std'.

While here, remove the source install instructions (most of it is
documented already, and the final step, choosing the right git
revision should be within the skills of anyone using pre-release
software.) Some other documentation is changing because it's been a
while since go generate was run.

Change-Id: I88c10fef87867536e83c7df063ae7241b2e9eea4
Reviewed-on: https://go-review.googlesource.com/11711
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-06-29 20:40:46 +00:00
Burcu Dogan 8fff803af0 mobile/cmd/gomobile: install darwin/arm and darwin/arm64 compilers
Change-Id: I16fe8db9ac9e22c7ba9c821b4d8bf858ab28f5f8
Reviewed-on: https://go-review.googlesource.com/11237
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-06-20 18:09:14 +00:00
David Crawshaw fb3a660302 cmd/gomobile: fix test broken in cl/11265
Change-Id: Ia431f061fd10aad17b53e2b0ef12fd15eaf8795d
Reviewed-on: https://go-review.googlesource.com/11255
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-06-19 17:38:45 +00:00
David Crawshaw 10a37afdaf cmd/gomobile: add -target flag
Also add a very simple test for gomobile build, some
documentation cleanup, and the -o flag for bind.

Change-Id: I719b92010ba2a5813049827c99502828788611ef
Reviewed-on: https://go-review.googlesource.com/11253
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-06-19 17:31:29 +00:00
David Crawshaw 8f15a83bc0 cmd/gomobile: do not run make.bash with user env
The user may have set GOBIN, in which case the existing go command is
overwritten. I cannot think of any relevant environment variables the
user would set, so the easiest thing is not to use them at all.

While here, fix the unit test I broke in cl/10319.

Change-Id: I8cef353b5a0e4aabae97169ff553b53f7973ff8b
Reviewed-on: https://go-review.googlesource.com/10397
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-05-28 17:26:45 +00:00
David Crawshaw a7a3501c10 cmd/gomobile: simpler download caching
Instead of trying to preserve the unpacked NDK, this stores the
downloaded archives in GOPATH/pkg/gomobile/dl and completely
rebuilds on reinitialization.

Also introduce checking that the version of Go we are using to do
the build matches the GOROOT we are building from.

Fixes golang/go#10187

Change-Id: I4a861718d8a413855917a5b1f1073e2cd84c9bb1
Reviewed-on: https://go-review.googlesource.com/9685
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-05-07 17:19:57 +00:00
Hyang-Ah (Hana) Kim 1ab6893162 cmd/gomobile: fix init_test.go to pass on windows/darwin.
Change-Id: I03a18267ddd35ce432a394732185dab0283f2da6
Reviewed-on: https://go-review.googlesource.com/9170
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-04-20 21:32:12 +00:00
Hyang-Ah Hana Kim f0c91fa51b cmd/gomobile: copy old5a to the tool chain.
The app/internal/callfn package requires old5a.

Change-Id: Id0e084dc5c1dd1275d0043412ab9ea0423e7651d
Reviewed-on: https://go-review.googlesource.com/9034
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-04-17 19:43:10 +00:00
Burcu Dogan 269086b6fe cmd/gomobile/init: download the prebuilt OpenAL library
Change-Id: I21ec4bbcce7f1821c5172522fc87c033c1277d35
Reviewed-on: https://go-review.googlesource.com/6860
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-03-06 02:07:52 +00:00
Hyang-Ah Hana Kim 614540a6db cmd/gomobile: 5a is gone.
See https://go-review.googlesource.com/6366

fixes golang/go#10056

Change-Id: If518d69398df0393feadf6b5d8c56da89a201090
Reviewed-on: https://go-review.googlesource.com/6482
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-03-02 20:30:11 +00:00
Hyang-Ah (Hana) Kim 496a9d6d05 cmd/gomobile: Windows support for 'init' command.
Change-Id: Ia9b5f8e076a7ff78a59e38c54e1dbac3f6cb8021
Reviewed-on: https://go-review.googlesource.com/6403
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-03-02 18:02:30 +00:00
Hyang-Ah (Hana) Kim f13db43649 cmd/gomobile: don't try to copy $GOROOT/include; no longer exists.
golang.org/cl/6361.

Change-Id: Id056efa8de166978e1385e5a683c9d512b33e3cf
Reviewed-on: https://go-review.googlesource.com/6402
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-03-01 16:10:40 +00:00
Hyang-Ah (Hana) Kim d6c8d03959 cmd/gobind: fix init_test.
$GOROOT instead of $HOME/go.

Change-Id: I6dd22057b58b0ad93ecbc6900a2fec09c41fe019
Reviewed-on: https://go-review.googlesource.com/6160
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-02-26 21:35:13 +00:00
David Crawshaw 6d45c43cd0 cmd/gomobile: check cross compilers are in sync
Fixes golang/go#9907

Change-Id: I34805ab3a71d720d028a9e2064b179fa329a4a5d
Reviewed-on: https://go-review.googlesource.com/5440
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-02-20 16:17:05 +00:00
David Crawshaw a52f1ea922 cmd/gomobile: init subcommand tests
Compare the output of gomobile init -x -n with what's expected.

Change-Id: Ib797c900b0a4cf1573395f8ffeb9a662a0fd6154
Reviewed-on: https://go-review.googlesource.com/5080
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-02-18 15:07:23 +00:00