cmd/gomobile: do not pass -i to 'go install' command
Fixes golang/go#13407 Also updates bind test. 'gomobile bind' currently runs 'go install' first and generates code from the compiled object. This makes the -i option unnecessary. Updated the bind command doc not to mention the -i option. The use of -i option from Android Studio GoBind plugin will be removed in a separate CL. Change-Id: Ie48c00874219adb5169e01d3ba61930728cf2314 Reviewed-on: https://go-review.googlesource.com/17253 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
9cdfd16af3
commit
01216d9779
|
@ -56,7 +56,7 @@ are prefixed with 'Go' unless the -prefix flag is provided.
|
|||
|
||||
The -v flag provides verbose output, including the list of packages built.
|
||||
|
||||
The build flags -a, -i, -n, -x, -gcflags, -ldflags, -tags, and -work
|
||||
The build flags -a, -n, -x, -gcflags, -ldflags, -tags, and -work
|
||||
are shared with the build command. For documentation, see 'go help build'.
|
||||
`,
|
||||
}
|
||||
|
|
|
@ -101,6 +101,11 @@ func TestBindAndroid(t *testing.T) {
|
|||
|
||||
var bindAndroidTmpl = template.Must(template.New("output").Parse(`GOMOBILE={{.GOPATH}}/pkg/gomobile
|
||||
WORK=$WORK
|
||||
GOOS=android GOARCH=arm GOARM=7 CC=$GOMOBILE/android-ndk-r10e/arm/bin/arm-linux-androideabi-gcc CXX=$GOMOBILE/android-ndk-r10e/arm/bin/arm-linux-androideabi-g++ CGO_ENABLED=1 go install -p={{.NumCPU}} -pkgdir=$GOMOBILE/pkg_android_arm -tags="" -x golang.org/x/mobile/asset
|
||||
rm -r -f "$WORK/fakegopath"
|
||||
mkdir -p $WORK/fakegopath/pkg
|
||||
cp $GOMOBILE/pkg_android_arm/golang.org/x/mobile/asset.a $WORK/fakegopath/pkg/android_arm/golang.org/x/mobile/asset.a
|
||||
mkdir -p $WORK/fakegopath/pkg/android_arm/golang.org/x/mobile
|
||||
mkdir -p $WORK/go_asset
|
||||
gobind -lang=go -outdir=$WORK/go_asset golang.org/x/mobile/asset
|
||||
mkdir -p $WORK/androidlib
|
||||
|
|
|
@ -268,7 +268,7 @@ func goCmd(subcmd string, srcs []string, env []string, args ...string) error {
|
|||
if buildV {
|
||||
cmd.Args = append(cmd.Args, "-v")
|
||||
}
|
||||
if buildI {
|
||||
if subcmd != "install" && buildI {
|
||||
cmd.Args = append(cmd.Args, "-i")
|
||||
}
|
||||
if buildX {
|
||||
|
|
Loading…
Reference in New Issue