]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo, cmd/compile, cmd/link: remove old style build tags
authorRuss Cox <rsc@golang.org>
Fri, 30 Sep 2022 15:06:06 +0000 (11:06 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 4 Oct 2022 19:36:17 +0000 (19:36 +0000)
[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>

17 files changed:
src/cmd/cgo/ast_go1.go
src/cmd/cgo/ast_go118.go
src/cmd/compile/internal/base/bootstrap_false.go
src/cmd/compile/internal/base/bootstrap_true.go
src/cmd/compile/internal/base/mapfile_mmap.go
src/cmd/compile/internal/base/mapfile_read.go
src/cmd/compile/internal/ir/mknode.go
src/cmd/compile/internal/ssa/flags_test.go
src/cmd/compile/internal/typecheck/_builtin/runtime.go
src/cmd/compile/internal/typecheck/mkbuiltin.go
src/cmd/compile/internal/types2/example_test.go
src/cmd/internal/bio/buf_mmap.go
src/cmd/internal/bio/buf_nommap.go
src/cmd/link/elf_test.go
src/cmd/link/internal/ld/outbuf_mmap.go
src/cmd/link/internal/ld/outbuf_nofallocate.go
src/cmd/link/internal/ld/outbuf_nommap.go

index f52bf00d7cb946e9844f485352daec989435a2db..ce61d29095585c8f59f36f92c8cc969ca2249f7e 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build compiler_bootstrap
-// +build compiler_bootstrap
 
 package main
 
index db0108ed7268366a5dc0543645645bed443a3ecb..9f759b8ee5f0ff76579e32efd3c824405bcd5244 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build !compiler_bootstrap
-// +build !compiler_bootstrap
 
 package main
 
index c77fcd730812d824c061d329ca0ed353d82a8b16..ea6da4348f53971936dcfbeb2055f137ca246011 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build !compiler_bootstrap
-// +build !compiler_bootstrap
 
 package base
 
index 1eb58b2f9dc1ce86ca9fb095715e685e667cbb3e..d0c6c88f56f94cc20f559e1bff38252853ca3354 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build compiler_bootstrap
-// +build compiler_bootstrap
 
 package base
 
index ceeb3c82d073a2bd95a8abc70907fd2a731663e7..62620443f55c3f4f24232de2d9df834575f51fca 100644 (file)
@@ -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
 
index e84810ea347eed96c110545e6551ec8c722ac5e9..5ac6272dc15226ab21b371ec0316d4cb297347e7 100644 (file)
@@ -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
 
index 68d8999f832bf6b5eb11efcf439e91ee1bd6d6e2..caf4ba01358cd8be4dee312488b6028c4cfa7a22 100644 (file)
@@ -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
index 0bc1097199464992994a2562a4f61795f2eb0f32..d0079ac5e83823d8e22ad414f88f61af3aa56bf5 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build amd64 || arm64
-// +build amd64 arm64
 
 package ssa
 
index 310148ce00ca4e0f1256b6c022faa15beea564c3..83695013c39cf8c8c4275ec0d8fdb47373f0ce5e 100644 (file)
@@ -7,7 +7,6 @@
 // to avoid depending on having a working compiler binary.
 
 //go:build ignore
-// +build ignore
 
 package runtime
 
index af71a9096392f8383a73bcd9b603c03356593d6d..0ac3e4793593bb5bf2b8e9912ee28d748220f93d 100644 (file)
@@ -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.
 
index ad0f22fcec4c8842857da1d2655aef50589d7497..9212c38560b1645c4f6bc58991601cde3fb8a2ae 100644 (file)
@@ -6,7 +6,6 @@
 // access to compiled packages for import.
 //
 //go:build !arm && !arm64
-// +build !arm,!arm64
 
 package types2_test
 
index 3543637154312651c7d2d2b394644c94ba42aea2..e428952bc9f09f83bb8458e44167368200bc8c0d 100644 (file)
@@ -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
 
index dab3435260a14b0352461098164f3b5fcca14d25..e9048609831a2e0d5a5eb828353ddbd75784420e 100644 (file)
@@ -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
 
index a75f35bf5d1ad13724938cad2b8ff7fd62ab1baf..dd202a32dc11a3fabe5c27f3d84dbc22c17aead1 100644 (file)
@@ -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
 
index d8f8a10db137f3f904c2aeaad75244df71e55e33..7bb728a1f895d18270125a3f2d2eaf97d647cddc 100644 (file)
@@ -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
 
index 6564bd54a3d1bcf27977493fedff76c829c34d0d..dd5afc61db92803e7ee004e0515fc7dc870c1938 100644 (file)
@@ -3,7 +3,6 @@
 // license that can be found in the LICENSE file.
 
 //go:build !darwin && !linux
-// +build !darwin,!linux
 
 package ld
 
index 4154981b099df07f0236e06a051984aa77829e2d..b1d3d2724f01a2172b5774c7f6d558a2e5aed77d 100644 (file)
@@ -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