diff --git a/src/runtime/gengoos.go b/src/runtime/gengoos.go index 029575bee22..06621c8dba2 100644 --- a/src/runtime/gengoos.go +++ b/src/runtime/gengoos.go @@ -46,7 +46,9 @@ func main() { 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 { diff --git a/src/runtime/zgoos_android.go b/src/runtime/zgoos_android.go index abfba808ba5..0590bd9ab7d 100644 --- a/src/runtime/zgoos_android.go +++ b/src/runtime/zgoos_android.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build android - package runtime const theGoos = `android` diff --git a/src/runtime/zgoos_darwin.go b/src/runtime/zgoos_darwin.go index eb39b53dd46..c0a7cd6e747 100644 --- a/src/runtime/zgoos_darwin.go +++ b/src/runtime/zgoos_darwin.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build darwin - package runtime const theGoos = `darwin` diff --git a/src/runtime/zgoos_dragonfly.go b/src/runtime/zgoos_dragonfly.go index f6e839d3d83..008d6de8118 100644 --- a/src/runtime/zgoos_dragonfly.go +++ b/src/runtime/zgoos_dragonfly.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build dragonfly - package runtime const theGoos = `dragonfly` diff --git a/src/runtime/zgoos_freebsd.go b/src/runtime/zgoos_freebsd.go index 3c47aef2ab4..2478940353e 100644 --- a/src/runtime/zgoos_freebsd.go +++ b/src/runtime/zgoos_freebsd.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build freebsd - package runtime const theGoos = `freebsd` diff --git a/src/runtime/zgoos_linux.go b/src/runtime/zgoos_linux.go index 5d899e3db6c..c775ab538d4 100644 --- a/src/runtime/zgoos_linux.go +++ b/src/runtime/zgoos_linux.go @@ -1,6 +1,6 @@ // generated by gengoos.go using 'go generate' -// +build linux +// +build !android package runtime diff --git a/src/runtime/zgoos_nacl.go b/src/runtime/zgoos_nacl.go index b5c4281fb56..d9d88f4508a 100644 --- a/src/runtime/zgoos_nacl.go +++ b/src/runtime/zgoos_nacl.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build nacl - package runtime const theGoos = `nacl` diff --git a/src/runtime/zgoos_netbsd.go b/src/runtime/zgoos_netbsd.go index b2e45222ae3..ff2c5cb8f4a 100644 --- a/src/runtime/zgoos_netbsd.go +++ b/src/runtime/zgoos_netbsd.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build netbsd - package runtime const theGoos = `netbsd` diff --git a/src/runtime/zgoos_openbsd.go b/src/runtime/zgoos_openbsd.go index 331c96dd662..b071dc63ab7 100644 --- a/src/runtime/zgoos_openbsd.go +++ b/src/runtime/zgoos_openbsd.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build openbsd - package runtime const theGoos = `openbsd` diff --git a/src/runtime/zgoos_plan9.go b/src/runtime/zgoos_plan9.go index f29eb452304..4306b0f1ef4 100644 --- a/src/runtime/zgoos_plan9.go +++ b/src/runtime/zgoos_plan9.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build plan9 - package runtime const theGoos = `plan9` diff --git a/src/runtime/zgoos_solaris.go b/src/runtime/zgoos_solaris.go index ac613db33c4..10f9537d05b 100644 --- a/src/runtime/zgoos_solaris.go +++ b/src/runtime/zgoos_solaris.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build solaris - package runtime const theGoos = `solaris` diff --git a/src/runtime/zgoos_windows.go b/src/runtime/zgoos_windows.go index 43710d862fe..56f5c58ce64 100644 --- a/src/runtime/zgoos_windows.go +++ b/src/runtime/zgoos_windows.go @@ -1,7 +1,5 @@ // generated by gengoos.go using 'go generate' -// +build windows - package runtime const theGoos = `windows`