1
0
mirror of https://github.com/golang/go synced 2024-11-19 00:54:42 -07:00

[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
This commit is contained in:
Shenghou Ma 2014-11-21 18:13:59 -05:00
parent cabc555326
commit adbca13cb3
12 changed files with 4 additions and 22 deletions

View File

@ -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 {

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build android
package runtime
const theGoos = `android`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build darwin
package runtime
const theGoos = `darwin`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build dragonfly
package runtime
const theGoos = `dragonfly`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build freebsd
package runtime
const theGoos = `freebsd`

View File

@ -1,6 +1,6 @@
// generated by gengoos.go using 'go generate'
// +build linux
// +build !android
package runtime

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build nacl
package runtime
const theGoos = `nacl`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build netbsd
package runtime
const theGoos = `netbsd`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build openbsd
package runtime
const theGoos = `openbsd`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build plan9
package runtime
const theGoos = `plan9`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build solaris
package runtime
const theGoos = `solaris`

View File

@ -1,7 +1,5 @@
// generated by gengoos.go using 'go generate'
// +build windows
package runtime
const theGoos = `windows`