Commit bda88551 authored by Hyang-Ah Hana Kim's avatar Hyang-Ah Hana Kim

cmd: allow buildmode=c-shared for android/386

Update golang/go#9327.

Change-Id: Iab7dad31cf6b9f9347c3f34faebb67ecb38b17fc
Reviewed-on: https://go-review.googlesource.com/16701
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
parent f4ccdddd
......@@ -616,7 +616,9 @@ func (t *tester) supportedBuildmode(mode string) bool {
return false
case "c-shared":
switch pair {
case "linux-386", "linux-amd64", "darwin-amd64", "android-arm", "linux-arm", "linux-arm64":
case "linux-386", "linux-amd64", "linux-arm", "linux-arm64",
"darwin-amd64",
"android-arm", "android-386":
return true
}
return false
......
......@@ -351,7 +351,7 @@ func buildModeInit() {
} else {
switch platform {
case "linux/amd64", "linux/arm", "linux/arm64", "linux/386",
"android/amd64", "android/arm":
"android/amd64", "android/arm", "android/386":
codegenArg = "-shared"
case "darwin/amd64":
default:
......
......@@ -325,7 +325,14 @@ func (mode *BuildMode) Set(s string) error {
}
*mode = BuildmodeCShared
case "shared":
if goos != "linux" || (goarch != "386" && goarch != "amd64" && goarch != "arm" && goarch != "arm64" && goarch != "ppc64le") {
switch goos {
case "linux":
switch goarch {
case "386", "amd64", "arm", "arm64", "ppc64le":
default:
return badmode()
}
default:
return badmode()
}
*mode = BuildmodeShared
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment