diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-09-16 16:59:58 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-09-23 18:12:59 +0000 |
commit | a413908dd064de6e3ea5b8d95d707a532bd3f4c8 (patch) | |
tree | ca1bb03a29fff2bb902aa015fe04fcd36988394d /src/runtime/internal | |
parent | bc320fc1f5bc5d6019e3d8d62aa32eac3417bb7f (diff) | |
download | go-a413908dd064de6e3ea5b8d95d707a532bd3f4c8.tar.gz go-a413908dd064de6e3ea5b8d95d707a532bd3f4c8.zip |
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>
Diffstat (limited to 'src/runtime/internal')
-rw-r--r-- | src/runtime/internal/sys/gengoos.go | 9 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_aix.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_android.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_darwin.go | 2 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_dragonfly.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_freebsd.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_hurd.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_illumos.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_ios.go | 25 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_js.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_linux.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_netbsd.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_openbsd.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_plan9.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_solaris.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_windows.go | 1 | ||||
-rw-r--r-- | src/runtime/internal/sys/zgoos_zos.go | 1 |
17 files changed, 50 insertions, 0 deletions
diff --git a/src/runtime/internal/sys/gengoos.go b/src/runtime/internal/sys/gengoos.go index 952b13649d..2a4bf0c3b4 100644 --- a/src/runtime/internal/sys/gengoos.go +++ b/src/runtime/internal/sys/gengoos.go @@ -44,6 +44,9 @@ func main() { } for _, target := range gooses { + if target == "nacl" { + continue + } var buf bytes.Buffer fmt.Fprintf(&buf, "// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.\n\n") if target == "linux" { @@ -52,6 +55,9 @@ func main() { if target == "solaris" { fmt.Fprintf(&buf, "// +build !illumos\n") // must explicitly exclude illumos for solaris } + if target == "darwin" { + fmt.Fprintf(&buf, "// +build !ios\n") // must explicitly exclude ios for darwin + } fmt.Fprintf(&buf, "// +build %s\n\n", target) // must explicitly include target for bootstrapping purposes fmt.Fprintf(&buf, "package sys\n\n") fmt.Fprintf(&buf, "const GOOS = `%s`\n\n", target) @@ -69,6 +75,9 @@ func main() { } for _, target := range goarches { + if target == "amd64p32" { + continue + } var buf bytes.Buffer fmt.Fprintf(&buf, "// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.\n\n") fmt.Fprintf(&buf, "// +build %s\n\n", target) // must explicitly include target for bootstrapping purposes diff --git a/src/runtime/internal/sys/zgoos_aix.go b/src/runtime/internal/sys/zgoos_aix.go index d97485c43c..0631d02aa5 100644 --- a/src/runtime/internal/sys/zgoos_aix.go +++ b/src/runtime/internal/sys/zgoos_aix.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_android.go b/src/runtime/internal/sys/zgoos_android.go index eec970b064..d356a40bec 100644 --- a/src/runtime/internal/sys/zgoos_android.go +++ b/src/runtime/internal/sys/zgoos_android.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_darwin.go b/src/runtime/internal/sys/zgoos_darwin.go index c40819ee55..6aa2db7e3a 100644 --- a/src/runtime/internal/sys/zgoos_darwin.go +++ b/src/runtime/internal/sys/zgoos_darwin.go @@ -1,5 +1,6 @@ // Code generated by gengoos.go using 'go generate'. DO NOT EDIT. +// +build !ios // +build darwin package sys @@ -13,6 +14,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_dragonfly.go b/src/runtime/internal/sys/zgoos_dragonfly.go index 3dc4edcc31..88ee1174f1 100644 --- a/src/runtime/internal/sys/zgoos_dragonfly.go +++ b/src/runtime/internal/sys/zgoos_dragonfly.go @@ -13,6 +13,7 @@ const GoosDragonfly = 1 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_freebsd.go b/src/runtime/internal/sys/zgoos_freebsd.go index 6c98b342f9..8de2ec0559 100644 --- a/src/runtime/internal/sys/zgoos_freebsd.go +++ b/src/runtime/internal/sys/zgoos_freebsd.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 1 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_hurd.go b/src/runtime/internal/sys/zgoos_hurd.go index d6dcc7bad4..183ccb02a1 100644 --- a/src/runtime/internal/sys/zgoos_hurd.go +++ b/src/runtime/internal/sys/zgoos_hurd.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 1 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_illumos.go b/src/runtime/internal/sys/zgoos_illumos.go index 17f4ecc34e..d04134e1df 100644 --- a/src/runtime/internal/sys/zgoos_illumos.go +++ b/src/runtime/internal/sys/zgoos_illumos.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 1 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_ios.go b/src/runtime/internal/sys/zgoos_ios.go new file mode 100644 index 0000000000..cf6e9d61f0 --- /dev/null +++ b/src/runtime/internal/sys/zgoos_ios.go @@ -0,0 +1,25 @@ +// Code generated by gengoos.go using 'go generate'. DO NOT EDIT. + +// +build ios + +package sys + +const GOOS = `ios` + +const GoosAix = 0 +const GoosAndroid = 0 +const GoosDarwin = 0 +const GoosDragonfly = 0 +const GoosFreebsd = 0 +const GoosHurd = 0 +const GoosIllumos = 0 +const GoosIos = 1 +const GoosJs = 0 +const GoosLinux = 0 +const GoosNacl = 0 +const GoosNetbsd = 0 +const GoosOpenbsd = 0 +const GoosPlan9 = 0 +const GoosSolaris = 0 +const GoosWindows = 0 +const GoosZos = 0 diff --git a/src/runtime/internal/sys/zgoos_js.go b/src/runtime/internal/sys/zgoos_js.go index 74c9943d9b..1d9279ab38 100644 --- a/src/runtime/internal/sys/zgoos_js.go +++ b/src/runtime/internal/sys/zgoos_js.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 1 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_linux.go b/src/runtime/internal/sys/zgoos_linux.go index 1d5fcb0685..0f718d704f 100644 --- a/src/runtime/internal/sys/zgoos_linux.go +++ b/src/runtime/internal/sys/zgoos_linux.go @@ -14,6 +14,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 1 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_netbsd.go b/src/runtime/internal/sys/zgoos_netbsd.go index 194fa6e432..2ae149ff13 100644 --- a/src/runtime/internal/sys/zgoos_netbsd.go +++ b/src/runtime/internal/sys/zgoos_netbsd.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_openbsd.go b/src/runtime/internal/sys/zgoos_openbsd.go index 2108691679..7d4d61e4ca 100644 --- a/src/runtime/internal/sys/zgoos_openbsd.go +++ b/src/runtime/internal/sys/zgoos_openbsd.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_plan9.go b/src/runtime/internal/sys/zgoos_plan9.go index e632a90b2e..30aec46df3 100644 --- a/src/runtime/internal/sys/zgoos_plan9.go +++ b/src/runtime/internal/sys/zgoos_plan9.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_solaris.go b/src/runtime/internal/sys/zgoos_solaris.go index 67b2ffbfcd..4bb8c99bce 100644 --- a/src/runtime/internal/sys/zgoos_solaris.go +++ b/src/runtime/internal/sys/zgoos_solaris.go @@ -14,6 +14,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_windows.go b/src/runtime/internal/sys/zgoos_windows.go index cf2d6f4fb0..d1f4290204 100644 --- a/src/runtime/internal/sys/zgoos_windows.go +++ b/src/runtime/internal/sys/zgoos_windows.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 diff --git a/src/runtime/internal/sys/zgoos_zos.go b/src/runtime/internal/sys/zgoos_zos.go index e5d79accb4..d22be46fc0 100644 --- a/src/runtime/internal/sys/zgoos_zos.go +++ b/src/runtime/internal/sys/zgoos_zos.go @@ -13,6 +13,7 @@ const GoosDragonfly = 0 const GoosFreebsd = 0 const GoosHurd = 0 const GoosIllumos = 0 +const GoosIos = 0 const GoosJs = 0 const GoosLinux = 0 const GoosNacl = 0 |