mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
f4ccddddae
commit
bda885511d
3 changed files with 12 additions and 3 deletions
4
src/cmd/dist/test.go
vendored
4
src/cmd/dist/test.go
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue