Skip to content

Commit

Permalink
starlark: disable int optimization in iOS, which doesn't support mmap (
Browse files Browse the repository at this point in the history
  • Loading branch information
adonovan authored Jul 6, 2020
1 parent f5d7f27 commit 5d2ea04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion starlark/int_generic.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build !linux,!darwin !amd64,!arm64,!mips64x,!ppc64x
//+build !linux,!darwin darwin,arm64 !amd64,!arm64,!mips64x,!ppc64x

package starlark

Expand Down
10 changes: 9 additions & 1 deletion starlark/int_posix64.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build linux darwin
//+build amd64 arm64 mips64x ppc64x
//+build amd64 arm64,!darwin mips64x ppc64x

package starlark

Expand All @@ -10,6 +10,14 @@ package starlark
// values be represented as an unsafe.Pointer, so that Int-to-Value
// interface conversion need not allocate.

// Although iOS (arm64,darwin) claims to be a POSIX-compliant,
// it limits each process to about 700MB of virtual address space,
// which defeats the optimization.
//
// TODO(golang.org/issue/38485): darwin,arm64 may refer to macOS in the future.
// Update this when there are distinct GOOS values for macOS, iOS, and other Apple
// operating systems on arm64.

import (
"log"
"math"
Expand Down

0 comments on commit 5d2ea04

Please sign in to comment.