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
|
|
@ -207,7 +207,7 @@ const (
|
|||
// arenaBaseOffset to offset into the top 4 GiB.
|
||||
//
|
||||
// WebAssembly currently has a limit of 4GB linear memory.
|
||||
heapAddrBits = (_64bit*(1-sys.GoarchWasm)*(1-sys.GoosDarwin*sys.GoarchArm64))*48 + (1-_64bit+sys.GoarchWasm)*(32-(sys.GoarchMips+sys.GoarchMipsle)) + 33*sys.GoosDarwin*sys.GoarchArm64
|
||||
heapAddrBits = (_64bit*(1-sys.GoarchWasm)*(1-(sys.GoosDarwin+sys.GoosIos)*sys.GoarchArm64))*48 + (1-_64bit+sys.GoarchWasm)*(32-(sys.GoarchMips+sys.GoarchMipsle)) + 33*(sys.GoosDarwin+sys.GoosIos)*sys.GoarchArm64
|
||||
|
||||
// maxAlloc is the maximum size of an allocation. On 64-bit,
|
||||
// it's theoretically possible to allocate 1<<heapAddrBits bytes. On
|
||||
|
|
@ -521,7 +521,7 @@ func mallocinit() {
|
|||
for i := 0x7f; i >= 0; i-- {
|
||||
var p uintptr
|
||||
switch {
|
||||
case GOARCH == "arm64" && GOOS == "darwin":
|
||||
case GOARCH == "arm64" && (GOOS == "darwin" || GOOS == "ios"):
|
||||
p = uintptr(i)<<40 | uintptrMask&(0x0013<<28)
|
||||
case GOARCH == "arm64":
|
||||
p = uintptr(i)<<40 | uintptrMask&(0x0040<<32)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue