Skip to content

Commit 7c32844

Browse files
tklausergopherbot
authored andcommitted
cmd, syscall: use syscall.Mmap on solaris for Go ≥ 1.20
CL 413374 added syscall.Mmap on solaris. Use it in cmd/compile and cmd/link if the bootstrap toolchain is Go ≥ 1.20. For #52875 For #54265 Change-Id: I9a0534bf97926eecf0c6f1f9218e855344ba158f Reviewed-on: https://go-review.googlesource.com/c/go/+/430496 Reviewed-by: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> Run-TryBot: Tobias Klauser <[email protected]>
1 parent 972870d commit 7c32844

File tree

7 files changed

+33
-12
lines changed

7 files changed

+33
-12
lines changed

src/cmd/compile/internal/base/mapfile_mmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
6-
// +build darwin dragonfly freebsd linux netbsd openbsd
5+
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || (solaris && go1.20)
6+
// +build darwin dragonfly freebsd linux netbsd openbsd solaris,go1.20
77

88
package base
99

src/cmd/compile/internal/base/mapfile_read.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd
6-
// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
5+
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !(solaris && go1.20)
6+
// +build !darwin
7+
// +build !dragonfly
8+
// +build !freebsd
9+
// +build !linux
10+
// +build !netbsd
11+
// +build !openbsd
12+
// +build !solaris !go1.20
713

814
package base
915

src/cmd/internal/bio/buf_mmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
6-
// +build darwin dragonfly freebsd linux netbsd openbsd
5+
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || (solaris && go1.20)
6+
// +build darwin dragonfly freebsd linux netbsd openbsd solaris,go1.20
77

88
package bio
99

src/cmd/internal/bio/buf_nommap.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd
6-
// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
5+
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !(solaris && go1.20)
6+
// +build !darwin
7+
// +build !dragonfly
8+
// +build !freebsd
9+
// +build !linux
10+
// +build !netbsd
11+
// +build !openbsd
12+
// +build !solaris !go1.20
713

814
package bio
915

src/cmd/link/internal/ld/outbuf_mmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd
6-
// +build aix darwin dragonfly freebsd linux netbsd openbsd
5+
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || (solaris && go1.20)
6+
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris,go1.20
77

88
package ld
99

src/cmd/link/internal/ld/outbuf_nommap.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !windows
6-
// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!windows
5+
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !(solaris && go1.20) && !windows
6+
// +build !aix
7+
// +build !darwin
8+
// +build !dragonfly
9+
// +build !freebsd
10+
// +build !linux
11+
// +build !netbsd
12+
// +build !openbsd
13+
// +build !solaris !go1.20
14+
// +build !windows
715

816
package ld
917

src/syscall/zerrors_solaris_amd64.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)