Skip to content

Commit bf97e72

Browse files
dmitshurgopherbot
authored andcommitted
all: drop old +build lines
Running 'go fix' on the cmd+std packages handled much of this change. Also update code generators to use only the new go:build lines, not the old +build ones. For #41184. For #60268. Change-Id: If35532abe3012e7357b02c79d5992ff5ac37ca23 Cq-Include-Trybots: luci.golang.try:gotip-linux-386-longtest,gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/536237 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent b2fd76a commit bf97e72

File tree

89 files changed

+6
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+6
-96
lines changed

src/cmd/compile/internal/ssa/_gen/cover.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# regular 'go run .' usage to run the generator.
1313

1414
cat >main_test.go <<-EOF
15-
// +build ignore
15+
//go:build ignore
1616
1717
package main
1818

src/cmd/compile/internal/typecheck/_builtin/coverage.go

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// to avoid depending on having a working compiler binary.
88

99
//go:build ignore
10-
// +build ignore
1110

1211
package coverage
1312

src/cmd/dist/notgo120.go

-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@
1717
// why Go moved on from Go 1.4 for bootstrap.
1818

1919
//go:build !go1.20
20-
// +build !go1.20
2120

2221
package building_Go_requires_Go_1_20_6_or_later

src/cmd/dist/sys_default.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !windows
6-
// +build !windows
76

87
package main
98

src/cmd/dist/util_gc.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build gc
6-
// +build gc
76

87
package main
98

src/cmd/dist/util_gccgo.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build gccgo
6-
// +build gccgo
76

87
package main
98

src/cmd/dist/vfp_arm.s

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build gc
6-
// +build gc
76

87
#include "textflag.h"
98

src/cmd/dist/vfp_default.s

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build gc && !arm
6-
// +build gc,!arm
76

87
#include "textflag.h"
98

src/cmd/go/internal/modcmd/vendor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func vendorPkg(vdir, pkg string) {
299299
// a MultiplePackageError on an otherwise valid package: the package could
300300
// have different names for GOOS=windows and GOOS=mac for example. On the
301301
// other hand if there's a NoGoError, the package might have source files
302-
// specifying "// +build ignore" those packages should be skipped because
302+
// specifying "//go:build ignore" those packages should be skipped because
303303
// embeds from ignored files can't be used.
304304
// TODO(#42504): Find a better way to avoid errors from ImportDir. We'll
305305
// need to figure this out when we switch to PackagesAndErrors as per the

src/cmd/go/internal/modload/import.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ func dirInModule(path, mpath, mdir string, isLocal bool) (dir string, haveGoFile
706706
// Now committed to returning dir (not "").
707707

708708
// Are there Go source files in the directory?
709-
// We don't care about build tags, not even "+build ignore".
709+
// We don't care about build tags, not even "go:build ignore".
710710
// We're just looking for a plausible directory.
711711
haveGoFiles, err = haveGoFilesCache.Do(dir, func() (bool, error) {
712712
// modindex.GetPackage will return ErrNotIndexed for any directories which

src/cmd/internal/goobj/mkbuiltin.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ignore
6-
// +build ignore
76

87
// Generate builtinlist.go from cmd/compile/internal/typecheck/builtin/runtime.go.
98

src/cmd/internal/notsha256/sha256block_386.s

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !purego
6-
// +build !purego
76

87
// SHA256 block routine. See sha256block.go for Go equivalent.
98
//

src/cmd/internal/notsha256/sha256block_amd64.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !purego
6-
// +build !purego
76

87
package notsha256
98

src/cmd/internal/notsha256/sha256block_amd64.s

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !purego
6-
// +build !purego
76

87
#include "textflag.h"
98

src/cmd/internal/notsha256/sha256block_decl.go

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !purego && (386 || amd64 || ppc64le || ppc64)
6-
// +build !purego
7-
// +build 386 amd64 ppc64le ppc64
86

97
package notsha256
108

src/cmd/internal/notsha256/sha256block_generic.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build purego || (!amd64 && !386 && !ppc64le && !ppc64)
6-
// +build purego !amd64,!386,!ppc64le,!ppc64
76

87
package notsha256
98

src/cmd/internal/notsha256/sha256block_ppc64x.s

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
//
1010

1111
//go:build !purego && (ppc64 || ppc64le)
12-
// +build !purego
13-
// +build ppc64 ppc64le
1412

1513
// Based on CRYPTOGAMS code with the following comment:
1614
// # ====================================================================

src/cmd/internal/obj/stringer.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ignore
6-
// +build ignore
76

87
// This is a mini version of the stringer tool customized for the Anames table
98
// in the architecture support for obj.

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

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
package ld
98

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

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !wasm && !windows
6-
// +build !wasm,!windows
76

87
package ld
98

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

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build wasm || windows
6-
// +build wasm windows
76

87
package ld
98

src/crypto/boring/notboring_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build (goexperiment.boringcrypto && !boringcrypto) || (!goexperiment.boringcrypto && boringcrypto)
6-
// +build goexperiment.boringcrypto,!boringcrypto !goexperiment.boringcrypto,boringcrypto
76

87
package boring_test
98

src/crypto/internal/boring/sig/sig_other.s

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// On other platforms (those using this source file), they don't.
99

1010
//go:build !amd64
11-
// +build !amd64
1211

1312
TEXT ·BoringCrypto(SB),$0
1413
RET

src/crypto/internal/edwards25519/field/fe_arm64.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build arm64,gc,!purego
5+
//go:build arm64 && gc && !purego
66

77
#include "textflag.h"
88

src/internal/goexperiment/exp_arenas_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_arenas_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_boringcrypto_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_boringcrypto_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_cacheprog_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_cacheprog_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_cgocheck2_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_cgocheck2_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_coverageredesign_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_coverageredesign_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_fieldtrack_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_fieldtrack_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_heapminimum512kib_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_heapminimum512kib_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_loopvar_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_loopvar_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_newinliner_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_newinliner_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_pagetrace_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_pagetrace_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_preemptibleloops_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_preemptibleloops_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_range_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_range_on.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/internal/goexperiment/exp_regabiargs_off.go

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)