mirror of
https://github.com/golang/go
synced 2024-11-18 00:54:45 -07:00
cmd: enable android/386 build (buildmode=pie by default)
no buildmode=c-shared yet. Update golang/go#9327. Change-Id: I9989d954d574807bac105da401c3463607fe8a99 Reviewed-on: https://go-review.googlesource.com/16700 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
7db77271e4
commit
888aadfa60
@ -222,7 +222,7 @@ func Main() {
|
|||||||
var flag_shared int
|
var flag_shared int
|
||||||
var flag_dynlink bool
|
var flag_dynlink bool
|
||||||
switch Thearch.Thechar {
|
switch Thearch.Thechar {
|
||||||
case '5', '6', '7', '9':
|
case '5', '6', '7', '8', '9':
|
||||||
obj.Flagcount("shared", "generate code that can be linked into a shared library", &flag_shared)
|
obj.Flagcount("shared", "generate code that can be linked into a shared library", &flag_shared)
|
||||||
}
|
}
|
||||||
if Thearch.Thechar == '6' {
|
if Thearch.Thechar == '6' {
|
||||||
|
@ -361,7 +361,7 @@ func buildModeInit() {
|
|||||||
ldBuildmode = "c-shared"
|
ldBuildmode = "c-shared"
|
||||||
case "default":
|
case "default":
|
||||||
switch platform {
|
switch platform {
|
||||||
case "android/arm", "android/arm64", "android/amd64":
|
case "android/arm", "android/arm64", "android/amd64", "android/386":
|
||||||
codegenArg = "-shared"
|
codegenArg = "-shared"
|
||||||
ldBuildmode = "pie"
|
ldBuildmode = "pie"
|
||||||
default:
|
default:
|
||||||
@ -375,7 +375,8 @@ func buildModeInit() {
|
|||||||
fatalf("-buildmode=pie not supported by gccgo")
|
fatalf("-buildmode=pie not supported by gccgo")
|
||||||
} else {
|
} else {
|
||||||
switch platform {
|
switch platform {
|
||||||
case "linux/arm", "android/arm", "linux/amd64", "android/amd64", "linux/arm64", "android/arm64", "linux/ppc64le":
|
case "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le",
|
||||||
|
"android/amd64", "android/arm", "android/arm64", "android/386":
|
||||||
codegenArg = "-shared"
|
codegenArg = "-shared"
|
||||||
default:
|
default:
|
||||||
fatalf("-buildmode=pie not supported on %s\n", platform)
|
fatalf("-buildmode=pie not supported on %s\n", platform)
|
||||||
|
Loading…
Reference in New Issue
Block a user