From: Cherry Zhang Date: Mon, 4 May 2020 15:25:01 +0000 (-0400) Subject: [dev.link] cmd/link: mmap on more platforms X-Git-Tag: go1.16beta1~1378^2~154 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=781c94e4c6f806b091f3bb75b9498e20550758be;p=gostls13.git [dev.link] cmd/link: mmap on more platforms We didn't mmap on them because they don't support msync. Now we no longer use msync, we can mmap. Change-Id: I9988278566e0db10be90a994509fc6b733e784a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/231920 Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot Reviewed-by: Than McIntosh --- diff --git a/src/cmd/link/internal/ld/outbuf_mmap.go b/src/cmd/link/internal/ld/outbuf_mmap.go index e6ee041abb..f5ccfc9584 100644 --- a/src/cmd/link/internal/ld/outbuf_mmap.go +++ b/src/cmd/link/internal/ld/outbuf_mmap.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux openbsd +// +build aix darwin dragonfly freebsd linux netbsd openbsd package ld diff --git a/src/cmd/link/internal/ld/outbuf_nommap.go b/src/cmd/link/internal/ld/outbuf_nommap.go index 51218d8ae7..bad01dc6d5 100644 --- a/src/cmd/link/internal/ld/outbuf_nommap.go +++ b/src/cmd/link/internal/ld/outbuf_nommap.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !darwin,!dragonfly,!freebsd,!linux,!openbsd,!windows +// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!windows package ld diff --git a/src/cmd/link/internal/ld/outbuf_test.go b/src/cmd/link/internal/ld/outbuf_test.go index d8c21426b3..db0a92485e 100644 --- a/src/cmd/link/internal/ld/outbuf_test.go +++ b/src/cmd/link/internal/ld/outbuf_test.go @@ -17,7 +17,7 @@ func TestMMap(t *testing.T) { switch runtime.GOOS { default: t.Skip("unsupported OS") - case "darwin", "dragonfly", "freebsd", "linux", "openbsd", "windows": + case "aix", "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "windows": } dir, err := ioutil.TempDir("", "TestMMap") if err != nil {