From: Rahul Chaudhry Date: Wed, 2 Dec 2015 21:27:44 +0000 (-0800) Subject: cmd/go: allow buildmode=c-shared for android/arm64. X-Git-Tag: go1.6beta1~230 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e65db59c1214eda0449acff677dc4d311aabed44;p=gostls13.git cmd/go: allow buildmode=c-shared for android/arm64. Also, enable test misc/cgo/testcshared for android/arm64. c/17245 and c/17246 provide the missing pieces for making this test work. "androidtest.bash" now passes on a Nexus 9 (volantis) device running Android build "LMY48T". Change-Id: Icb9fd2d17d97e0f04cb18d0cd91640c80fbd3fb4 Reviewed-on: https://go-review.googlesource.com/17333 Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 2e15247d6e..da973a7a06 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -375,8 +375,8 @@ func (t *tester) registerTests() { break } - // Darwin ARM64 fails with internal linking. - if t.goos == "darwin" && t.goarch == "arm64" { + // Darwin/Android ARM64 fails with internal linking. + if (t.goos == "darwin" || t.goos == "android") && t.goarch == "arm64" { break } @@ -618,7 +618,7 @@ func (t *tester) supportedBuildmode(mode string) bool { switch pair { case "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "darwin-amd64", - "android-arm", "android-386": + "android-arm", "android-arm64", "android-386": return true } return false diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index 57ca28dd08..c11c062a50 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -351,7 +351,7 @@ func buildModeInit() { } else { switch platform { case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", - "android/amd64", "android/arm", "android/386": + "android/amd64", "android/arm", "android/arm64", "android/386": codegenArg = "-shared" case "darwin/amd64": default: