From e65db59c1214eda0449acff677dc4d311aabed44 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Wed, 2 Dec 2015 13:27:44 -0800 Subject: [PATCH] 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 --- src/cmd/dist/test.go | 6 +++--- src/cmd/go/build.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 2e15247d6e4..da973a7a063 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 57ca28dd08c..c11c062a506 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: