Skip to content
This repository was archived by the owner on Nov 22, 2019. It is now read-only.

Commit a08f54f

Browse files
committed
cmd/go: enable android/amd64 build.
For golang/go#10743 Change-Id: Iec047821147a0e28edebf875fefe25993785702b Reviewed-on: https://go-review.googlesource.com/15994 Reviewed-by: David Crawshaw <[email protected]>
1 parent ff6005b commit a08f54f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ func buildModeInit() {
350350
codegenArg = "-fPIC"
351351
} else {
352352
switch platform {
353-
case "linux/amd64", "linux/arm", "android/arm":
353+
case "linux/amd64", "linux/arm",
354+
"android/amd64", "android/arm":
354355
codegenArg = "-shared"
355356
case "darwin/amd64":
356357
default:
@@ -3075,7 +3076,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, pcCFLAGS, pcLDFLAGS, cgofi
30753076

30763077
linkobj = append(linkobj, p.SysoFiles...)
30773078
dynobj := obj + "_cgo_.o"
3078-
pie := goarch == "arm" && (goos == "linux" || goos == "android")
3079+
pie := (goarch == "arm" && goos == "linux") || goos == "android"
30793080
if pie { // we need to use -pie for Linux/ARM to get accurate imported sym
30803081
cgoLDFLAGS = append(cgoLDFLAGS, "-pie")
30813082
}

0 commit comments

Comments
 (0)