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:
parent
cabc555326
commit
adbca13cb3
@ -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 {
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build android
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `android`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build darwin
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `darwin`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build dragonfly
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `dragonfly`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build freebsd
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `freebsd`
|
||||
|
@ -1,6 +1,6 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build linux
|
||||
// +build !android
|
||||
|
||||
package runtime
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build nacl
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `nacl`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build netbsd
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `netbsd`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build openbsd
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `openbsd`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build plan9
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `plan9`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build solaris
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `solaris`
|
||||
|
@ -1,7 +1,5 @@
|
||||
// generated by gengoos.go using 'go generate'
|
||||
|
||||
// +build windows
|
||||
|
||||
package runtime
|
||||
|
||||
const theGoos = `windows`
|
||||
|
Loading…
Reference in New Issue
Block a user