aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2022-09-30 11:06:06 -0400
committerRuss Cox <rsc@golang.org>2022-10-04 19:36:17 +0000
commit058f019e45fc1f18842e0339d7d56d804936263b (patch)
treef9736ece99304d4a6d259a249f17ac8f8d917e8e /src
parent164406ad931cd74c1541a71f2817312ec82882ed (diff)
downloadgo-058f019e45fc1f18842e0339d7d56d804936263b.tar.xz
cmd/cgo, cmd/compile, cmd/link: remove old style build tags
[Roll-forward of CL 436915 by Tobias Klauser, with builtin and gen directories dropped now that they've been handled separately.] The minimum bootstrap version for Go ≥ 1.20 is Go 1.17. That version supports the new style //go:build lines. Thus the old style //+build lines can be dropped in this part of the tree as well. Leave the //+build lines in cmd/dist which will ensure the minimum Go version during bootstrap. As suggested by Cherry during review of CL 430496 For #44505 Change-Id: Ifa686656c3e50bf7f92f70747b44d74a7d51bad8 Reviewed-on: https://go-review.googlesource.com/c/go/+/435473 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/cgo/ast_go1.go1
-rw-r--r--src/cmd/cgo/ast_go118.go1
-rw-r--r--src/cmd/compile/internal/base/bootstrap_false.go1
-rw-r--r--src/cmd/compile/internal/base/bootstrap_true.go1
-rw-r--r--src/cmd/compile/internal/base/mapfile_mmap.go1
-rw-r--r--src/cmd/compile/internal/base/mapfile_read.go7
-rw-r--r--src/cmd/compile/internal/ir/mknode.go1
-rw-r--r--src/cmd/compile/internal/ssa/flags_test.go1
-rw-r--r--src/cmd/compile/internal/typecheck/_builtin/runtime.go1
-rw-r--r--src/cmd/compile/internal/typecheck/mkbuiltin.go1
-rw-r--r--src/cmd/compile/internal/types2/example_test.go1
-rw-r--r--src/cmd/internal/bio/buf_mmap.go1
-rw-r--r--src/cmd/internal/bio/buf_nommap.go7
-rw-r--r--src/cmd/link/elf_test.go1
-rw-r--r--src/cmd/link/internal/ld/outbuf_mmap.go1
-rw-r--r--src/cmd/link/internal/ld/outbuf_nofallocate.go1
-rw-r--r--src/cmd/link/internal/ld/outbuf_nommap.go9
17 files changed, 0 insertions, 37 deletions
diff --git a/src/cmd/cgo/ast_go1.go b/src/cmd/cgo/ast_go1.go
index f52bf00d7c..ce61d29095 100644
--- a/src/cmd/cgo/ast_go1.go
+++ b/src/cmd/cgo/ast_go1.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build compiler_bootstrap
-// +build compiler_bootstrap
package main
diff --git a/src/cmd/cgo/ast_go118.go b/src/cmd/cgo/ast_go118.go
index db0108ed72..9f759b8ee5 100644
--- a/src/cmd/cgo/ast_go118.go
+++ b/src/cmd/cgo/ast_go118.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !compiler_bootstrap
-// +build !compiler_bootstrap
package main
diff --git a/src/cmd/compile/internal/base/bootstrap_false.go b/src/cmd/compile/internal/base/bootstrap_false.go
index c77fcd7308..ea6da4348f 100644
--- a/src/cmd/compile/internal/base/bootstrap_false.go
+++ b/src/cmd/compile/internal/base/bootstrap_false.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !compiler_bootstrap
-// +build !compiler_bootstrap
package base
diff --git a/src/cmd/compile/internal/base/bootstrap_true.go b/src/cmd/compile/internal/base/bootstrap_true.go
index 1eb58b2f9d..d0c6c88f56 100644
--- a/src/cmd/compile/internal/base/bootstrap_true.go
+++ b/src/cmd/compile/internal/base/bootstrap_true.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build compiler_bootstrap
-// +build compiler_bootstrap
package base
diff --git a/src/cmd/compile/internal/base/mapfile_mmap.go b/src/cmd/compile/internal/base/mapfile_mmap.go
index ceeb3c82d0..62620443f5 100644
--- a/src/cmd/compile/internal/base/mapfile_mmap.go
+++ b/src/cmd/compile/internal/base/mapfile_mmap.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || (solaris && go1.20)
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris,go1.20
package base
diff --git a/src/cmd/compile/internal/base/mapfile_read.go b/src/cmd/compile/internal/base/mapfile_read.go
index e84810ea34..5ac6272dc1 100644
--- a/src/cmd/compile/internal/base/mapfile_read.go
+++ b/src/cmd/compile/internal/base/mapfile_read.go
@@ -3,13 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !(solaris && go1.20)
-// +build !darwin
-// +build !dragonfly
-// +build !freebsd
-// +build !linux
-// +build !netbsd
-// +build !openbsd
-// +build !solaris !go1.20
package base
diff --git a/src/cmd/compile/internal/ir/mknode.go b/src/cmd/compile/internal/ir/mknode.go
index 68d8999f83..caf4ba0135 100644
--- a/src/cmd/compile/internal/ir/mknode.go
+++ b/src/cmd/compile/internal/ir/mknode.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
// Note: this program must be run in this directory.
// go run mknode.go
diff --git a/src/cmd/compile/internal/ssa/flags_test.go b/src/cmd/compile/internal/ssa/flags_test.go
index 0bc1097199..d0079ac5e8 100644
--- a/src/cmd/compile/internal/ssa/flags_test.go
+++ b/src/cmd/compile/internal/ssa/flags_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build amd64 || arm64
-// +build amd64 arm64
package ssa
diff --git a/src/cmd/compile/internal/typecheck/_builtin/runtime.go b/src/cmd/compile/internal/typecheck/_builtin/runtime.go
index 310148ce00..83695013c3 100644
--- a/src/cmd/compile/internal/typecheck/_builtin/runtime.go
+++ b/src/cmd/compile/internal/typecheck/_builtin/runtime.go
@@ -7,7 +7,6 @@
// to avoid depending on having a working compiler binary.
//go:build ignore
-// +build ignore
package runtime
diff --git a/src/cmd/compile/internal/typecheck/mkbuiltin.go b/src/cmd/compile/internal/typecheck/mkbuiltin.go
index af71a90963..0ac3e47935 100644
--- a/src/cmd/compile/internal/typecheck/mkbuiltin.go
+++ b/src/cmd/compile/internal/typecheck/mkbuiltin.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build ignore
-// +build ignore
// Generate builtin.go from builtin/runtime.go.
diff --git a/src/cmd/compile/internal/types2/example_test.go b/src/cmd/compile/internal/types2/example_test.go
index ad0f22fcec..9212c38560 100644
--- a/src/cmd/compile/internal/types2/example_test.go
+++ b/src/cmd/compile/internal/types2/example_test.go
@@ -6,7 +6,6 @@
// access to compiled packages for import.
//
//go:build !arm && !arm64
-// +build !arm,!arm64
package types2_test
diff --git a/src/cmd/internal/bio/buf_mmap.go b/src/cmd/internal/bio/buf_mmap.go
index 3543637154..e428952bc9 100644
--- a/src/cmd/internal/bio/buf_mmap.go
+++ b/src/cmd/internal/bio/buf_mmap.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || (solaris && go1.20)
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris,go1.20
package bio
diff --git a/src/cmd/internal/bio/buf_nommap.go b/src/cmd/internal/bio/buf_nommap.go
index dab3435260..e904860983 100644
--- a/src/cmd/internal/bio/buf_nommap.go
+++ b/src/cmd/internal/bio/buf_nommap.go
@@ -3,13 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !(solaris && go1.20)
-// +build !darwin
-// +build !dragonfly
-// +build !freebsd
-// +build !linux
-// +build !netbsd
-// +build !openbsd
-// +build !solaris !go1.20
package bio
diff --git a/src/cmd/link/elf_test.go b/src/cmd/link/elf_test.go
index a75f35bf5d..dd202a32dc 100644
--- a/src/cmd/link/elf_test.go
+++ b/src/cmd/link/elf_test.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build dragonfly || freebsd || linux || netbsd || openbsd
-// +build dragonfly freebsd linux netbsd openbsd
package main
diff --git a/src/cmd/link/internal/ld/outbuf_mmap.go b/src/cmd/link/internal/ld/outbuf_mmap.go
index d8f8a10db1..7bb728a1f8 100644
--- a/src/cmd/link/internal/ld/outbuf_mmap.go
+++ b/src/cmd/link/internal/ld/outbuf_mmap.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || (solaris && go1.20)
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris,go1.20
package ld
diff --git a/src/cmd/link/internal/ld/outbuf_nofallocate.go b/src/cmd/link/internal/ld/outbuf_nofallocate.go
index 6564bd54a3..dd5afc61db 100644
--- a/src/cmd/link/internal/ld/outbuf_nofallocate.go
+++ b/src/cmd/link/internal/ld/outbuf_nofallocate.go
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !darwin && !linux
-// +build !darwin,!linux
package ld
diff --git a/src/cmd/link/internal/ld/outbuf_nommap.go b/src/cmd/link/internal/ld/outbuf_nommap.go
index 4154981b09..b1d3d2724f 100644
--- a/src/cmd/link/internal/ld/outbuf_nommap.go
+++ b/src/cmd/link/internal/ld/outbuf_nommap.go
@@ -3,15 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !(solaris && go1.20) && !windows
-// +build !aix
-// +build !darwin
-// +build !dragonfly
-// +build !freebsd
-// +build !linux
-// +build !netbsd
-// +build !openbsd
-// +build !solaris !go1.20
-// +build !windows
package ld