Skip to content

Commit

Permalink
cmd/cgo, cmd/compile, cmd/link: remove old style build tags
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
rsc committed Oct 4, 2022
1 parent 164406a commit 058f019
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 37 deletions.
1 change: 0 additions & 1 deletion src/cmd/cgo/ast_go1.go
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build compiler_bootstrap
// +build compiler_bootstrap

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/cgo/ast_go118.go
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !compiler_bootstrap
// +build !compiler_bootstrap

package main

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/base/bootstrap_false.go
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !compiler_bootstrap
// +build !compiler_bootstrap

package base

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/base/bootstrap_true.go
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build compiler_bootstrap
// +build compiler_bootstrap

package base

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/base/mapfile_mmap.go
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions src/cmd/compile/internal/base/mapfile_read.go
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/ir/mknode.go
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/ssa/flags_test.go
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build amd64 || arm64
// +build amd64 arm64

package ssa

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/typecheck/_builtin/runtime.go
Expand Up @@ -7,7 +7,6 @@
// to avoid depending on having a working compiler binary.

//go:build ignore
// +build ignore

package runtime

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/typecheck/mkbuiltin.go
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/types2/example_test.go
Expand Up @@ -6,7 +6,6 @@
// access to compiled packages for import.
//
//go:build !arm && !arm64
// +build !arm,!arm64

package types2_test

Expand Down
1 change: 0 additions & 1 deletion src/cmd/internal/bio/buf_mmap.go
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions src/cmd/internal/bio/buf_nommap.go
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion src/cmd/link/elf_test.go
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion src/cmd/link/internal/ld/outbuf_mmap.go
Expand Up @@ -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

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

//go:build !darwin && !linux
// +build !darwin,!linux

package ld

Expand Down
9 changes: 0 additions & 9 deletions src/cmd/link/internal/ld/outbuf_nommap.go
Expand Up @@ -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

Expand Down

0 comments on commit 058f019

Please sign in to comment.