[dev.cc] runtime: explicitly exclude android in zgoos_linux.go
Otherwise both zgoos_linux.go and zgoos_android.go will be compiled
for GOOS=android.
LGTM=crawshaw, rsc
R=rsc, crawshaw
CC=golang-codereviews
https://golang.org/cl/178110043
diff --git a/src/runtime/gengoos.go b/src/runtime/gengoos.go
index 029575b..06621c8 100644
--- a/src/runtime/gengoos.go
+++ b/src/runtime/gengoos.go
@@ -46,7 +46,9 @@
for _, target := range gooses {
var buf bytes.Buffer
fmt.Fprintf(&buf, "// generated by gengoos.go using 'go generate'\n\n")
- fmt.Fprintf(&buf, "// +build %s\n\n", target) // usually redundant, but not always; see linux vs android
+ if target == "linux" {
+ fmt.Fprintf(&buf, "// +build !android\n\n") // must explicitly exclude android for linux
+ }
fmt.Fprintf(&buf, "package runtime\n\n")
fmt.Fprintf(&buf, "const theGoos = `%s`\n\n", target)
for _, goos := range gooses {