Skip to content

Commit

Permalink
all: drop old +build lines
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dmitshur authored and pull[bot] committed Nov 16, 2023
1 parent 883ee34 commit 9572bae
Show file tree
Hide file tree
Showing 89 changed files with 6 additions and 96 deletions.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/_gen/cover.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# regular 'go run .' usage to run the generator.

cat >main_test.go <<-EOF
// +build ignore
//go:build ignore
package main
Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/typecheck/_builtin/coverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// to avoid depending on having a working compiler binary.

//go:build ignore
// +build ignore

package coverage

Expand Down
1 change: 0 additions & 1 deletion src/cmd/dist/notgo120.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
// why Go moved on from Go 1.4 for bootstrap.

//go:build !go1.20
// +build !go1.20

package building_Go_requires_Go_1_20_6_or_later
1 change: 0 additions & 1 deletion src/cmd/dist/sys_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !windows
// +build !windows

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/dist/util_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build gc
// +build gc

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/dist/util_gccgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build gccgo
// +build gccgo

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/dist/vfp_arm.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build gc
// +build gc

#include "textflag.h"

Expand Down
1 change: 0 additions & 1 deletion src/cmd/dist/vfp_default.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build gc && !arm
// +build gc,!arm

#include "textflag.h"

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modcmd/vendor.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func vendorPkg(vdir, pkg string) {
// a MultiplePackageError on an otherwise valid package: the package could
// have different names for GOOS=windows and GOOS=mac for example. On the
// other hand if there's a NoGoError, the package might have source files
// specifying "// +build ignore" those packages should be skipped because
// specifying "//go:build ignore" those packages should be skipped because
// embeds from ignored files can't be used.
// TODO(#42504): Find a better way to avoid errors from ImportDir. We'll
// need to figure this out when we switch to PackagesAndErrors as per the
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modload/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ func dirInModule(path, mpath, mdir string, isLocal bool) (dir string, haveGoFile
// Now committed to returning dir (not "").

// Are there Go source files in the directory?
// We don't care about build tags, not even "+build ignore".
// We don't care about build tags, not even "go:build ignore".
// We're just looking for a plausible directory.
haveGoFiles, err = haveGoFilesCache.Do(dir, func() (bool, error) {
// modindex.GetPackage will return ErrNotIndexed for any directories which
Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/goobj/mkbuiltin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

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

Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/notsha256/sha256block_386.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !purego
// +build !purego

// SHA256 block routine. See sha256block.go for Go equivalent.
//
Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/notsha256/sha256block_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !purego
// +build !purego

package notsha256

Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/notsha256/sha256block_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !purego
// +build !purego

#include "textflag.h"

Expand Down
2 changes: 0 additions & 2 deletions src/cmd/internal/notsha256/sha256block_decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !purego && (386 || amd64 || ppc64le || ppc64)
// +build !purego
// +build 386 amd64 ppc64le ppc64

package notsha256

Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/notsha256/sha256block_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

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

package notsha256

Expand Down
2 changes: 0 additions & 2 deletions src/cmd/internal/notsha256/sha256block_ppc64x.s
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
//

//go:build !purego && (ppc64 || ppc64le)
// +build !purego
// +build ppc64 ppc64le

// Based on CRYPTOGAMS code with the following comment:
// # ====================================================================
Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/obj/stringer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

// This is a mini version of the stringer tool customized for the Anames table
// in the architecture support for obj.
Expand Down
1 change: 0 additions & 1 deletion src/cmd/link/internal/ld/elf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build cgo
// +build cgo

package ld

Expand Down
1 change: 0 additions & 1 deletion src/cmd/link/internal/ld/execarchive.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !wasm && !windows
// +build !wasm,!windows

package ld

Expand Down
1 change: 0 additions & 1 deletion src/cmd/link/internal/ld/execarchive_noexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build wasm || windows
// +build wasm windows

package ld

Expand Down
1 change: 0 additions & 1 deletion src/crypto/boring/notboring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build (goexperiment.boringcrypto && !boringcrypto) || (!goexperiment.boringcrypto && boringcrypto)
// +build goexperiment.boringcrypto,!boringcrypto !goexperiment.boringcrypto,boringcrypto

package boring_test

Expand Down
1 change: 0 additions & 1 deletion src/crypto/internal/boring/sig/sig_other.s
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// On other platforms (those using this source file), they don't.

//go:build !amd64
// +build !amd64

TEXT ·BoringCrypto(SB),$0
RET
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/internal/edwards25519/field/fe_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -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 arm64,gc,!purego
//go:build arm64 && gc && !purego

#include "textflag.h"

Expand Down
1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_arenas_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_arenas_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_boringcrypto_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_boringcrypto_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_cacheprog_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_cacheprog_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_cgocheck2_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_cgocheck2_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_coverageredesign_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_coverageredesign_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_fieldtrack_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_fieldtrack_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_heapminimum512kib_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_heapminimum512kib_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_loopvar_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_loopvar_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_newinliner_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_newinliner_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_pagetrace_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_pagetrace_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_preemptibleloops_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_preemptibleloops_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_range_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_range_on.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/internal/goexperiment/exp_regabiargs_off.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9572bae

Please sign in to comment.