]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: mmap on more platforms
authorCherry Zhang <cherryyz@google.com>
Mon, 4 May 2020 15:25:01 +0000 (11:25 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 4 May 2020 17:04:30 +0000 (17:04 +0000)
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 <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/outbuf_mmap.go
src/cmd/link/internal/ld/outbuf_nommap.go
src/cmd/link/internal/ld/outbuf_test.go

index e6ee041abbc92a82553d4a71f2e4faf055c38df9..f5ccfc95847c6018c77efba06e755fbdf46dbcfe 100644 (file)
@@ -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
 
index 51218d8ae7be14bc149ef16f5fa5d7cb51a8daad..bad01dc6d56f0f4ee59849e990f597046c9eaa0e 100644 (file)
@@ -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
 
index d8c21426b35d96aad8f76ac280ade77b9bc3569b..db0a92485ea961b53143768d08219769fbab73f1 100644 (file)
@@ -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 {