mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: add GOOS=ios
Introduce GOOS=ios for iOS systems. GOOS=ios matches "darwin" build tag, like GOOS=android matches "linux" and GOOS=illumos matches "solaris". Only ios/arm64 is supported (ios/amd64 is not). GOOS=ios and GOOS=darwin remain essentially the same at this point. They will diverge at later time, to differentiate macOS and iOS. Uses of GOOS=="darwin" are changed to (GOOS=="darwin" || GOOS=="ios"), except if it clearly means macOS (e.g. GOOS=="darwin" && GOARCH=="amd64"), it remains GOOS=="darwin". Updates #38485. Change-Id: I4faacdc1008f42434599efb3c3ad90763a83b67c Reviewed-on: https://go-review.googlesource.com/c/go/+/254740 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
bc320fc1f5
commit
a413908dd0
99 changed files with 215 additions and 125 deletions
|
|
@ -129,7 +129,7 @@ func newFile(fd uintptr, name string, kind newFileKind) *File {
|
|||
// used with kqueue.
|
||||
if kind == kindOpenFile {
|
||||
switch runtime.GOOS {
|
||||
case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd":
|
||||
case "darwin", "ios", "dragonfly", "freebsd", "netbsd", "openbsd":
|
||||
var st syscall.Stat_t
|
||||
err := ignoringEINTR(func() error {
|
||||
return syscall.Fstat(fdi, &st)
|
||||
|
|
@ -150,7 +150,7 @@ func newFile(fd uintptr, name string, kind newFileKind) *File {
|
|||
// on Darwin, kqueue does not work properly with fifos:
|
||||
// closing the last writer does not cause a kqueue event
|
||||
// for any readers. See issue #24164.
|
||||
if runtime.GOOS == "darwin" && typ == syscall.S_IFIFO {
|
||||
if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && typ == syscall.S_IFIFO {
|
||||
pollable = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue