Skip to content

Commit

Permalink
all: update go directive to 1.18
Browse files Browse the repository at this point in the history
Done with:

go get go@1.18
go mod tidy
go fix ./...

Using go1.21.3.

Also update code generators to use only the new go:build lines,
not the old +build ones.

For golang/go#60268.

Change-Id: I6aabc42efb6ab3329981100e1db2263aac5e92a6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/534222
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 gopherbot committed Oct 11, 2023
1 parent 1d9f0b6 commit 1bfbee0
Show file tree
Hide file tree
Showing 418 changed files with 24 additions and 534 deletions.
1 change: 0 additions & 1 deletion cpu/asm_aix_ppc64.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 cpu/cpu_aix.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 aix
// +build aix

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_arm64.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 cpu/cpu_gc_arm64.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 cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_gc_s390x.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 cpu

Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_gc_x86.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 (386 || amd64 || amd64p32) && gc
// +build 386 amd64 amd64p32
// +build gc

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_gccgo_arm64.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 cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_gccgo_s390x.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 cpu

Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_gccgo_x86.c
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 (386 || amd64 || amd64p32) && gccgo
// +build 386 amd64 amd64p32
// +build gccgo

#include <cpuid.h>
#include <stdint.h>
Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_gccgo_x86.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 (386 || amd64 || amd64p32) && gccgo
// +build 386 amd64 amd64p32
// +build gccgo

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_linux.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 !386 && !amd64 && !amd64p32 && !arm64
// +build !386,!amd64,!amd64p32,!arm64

package cpu

Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_linux_mips64x.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 linux && (mips64 || mips64le)
// +build linux
// +build mips64 mips64le

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_linux_noinit.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 linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x

package cpu

Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_linux_ppc64x.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 linux && (ppc64 || ppc64le)
// +build linux
// +build ppc64 ppc64le

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_loong64.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 loong64
// +build loong64

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_mips64x.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 mips64 || mips64le
// +build mips64 mips64le

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_mipsx.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 mips || mipsle
// +build mips mipsle

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_other_arm.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 !linux && arm
// +build !linux,arm

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_other_arm64.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 !linux && !netbsd && !openbsd && arm64
// +build !linux,!netbsd,!openbsd,arm64

package cpu

Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_other_mips64x.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 !linux && (mips64 || mips64le)
// +build !linux
// +build mips64 mips64le

package cpu

Expand Down
3 changes: 0 additions & 3 deletions cpu/cpu_other_ppc64x.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// license that can be found in the LICENSE file.

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

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_other_riscv64.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 !linux && riscv64
// +build !linux,riscv64

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_ppc64x.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 ppc64 || ppc64le
// +build ppc64 ppc64le

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_riscv64.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 riscv64
// +build riscv64

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_s390x.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 cpu/cpu_wasm.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
// +build wasm

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/cpu_x86.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 386 || amd64 || amd64p32
// +build 386 amd64 amd64p32

package cpu

Expand Down
2 changes: 0 additions & 2 deletions cpu/cpu_x86.s
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 (386 || amd64 || amd64p32) && gc
// +build 386 amd64 amd64p32
// +build gc

#include "textflag.h"

Expand Down
1 change: 0 additions & 1 deletion cpu/endian_big.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 armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/endian_little.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 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/proc_cpuinfo_linux.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 linux && arm64
// +build linux,arm64

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/runtime_auxv_go121.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 go1.21
// +build go1.21

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/runtime_auxv_go121_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 go1.21
// +build go1.21

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/syscall_aix_gccgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// gccgo's libgo and thus must not used a CGo method.

//go:build aix && gccgo
// +build aix,gccgo

package cpu

Expand Down
1 change: 0 additions & 1 deletion cpu/syscall_aix_ppc64_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// (See golang.org/issue/32102)

//go:build aix && ppc64 && gc
// +build aix,ppc64,gc

package cpu

Expand Down
1 change: 0 additions & 1 deletion execabs/execabs_go118.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 !go1.19
// +build !go1.19

package execabs

Expand Down
1 change: 0 additions & 1 deletion execabs/execabs_go119.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 go1.19
// +build go1.19

package execabs

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module golang.org/x/sys

go 1.17
go 1.18
11 changes: 2 additions & 9 deletions plan9/mksyscall.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 program reads a file containing function prototypes
Expand Down Expand Up @@ -55,11 +54,6 @@ func goBuildTags() string {
return strings.ReplaceAll(*tags, ",", " && ")
}

// buildTags returns build tags in the +build format.
func buildTags() string {
return *tags
}

// Param is function parameter
type Param struct {
Name string
Expand Down Expand Up @@ -123,7 +117,7 @@ func main() {
}

libc := false
if goos == "darwin" && strings.Contains(buildTags(), ",go1.12") {
if goos == "darwin" && strings.Contains(goBuildTags(), " && go1.12") {
libc = true
}
trampolines := map[string]bool{}
Expand Down Expand Up @@ -383,14 +377,13 @@ func main() {
}
file.Close()
}
fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text)
fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), text)
}

const srcTemplate = `// %s
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build %s
// +build %s
package plan9
Expand Down
1 change: 0 additions & 1 deletion plan9/pwd_go15_plan9.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 go1.5
// +build go1.5

package plan9

Expand Down
1 change: 0 additions & 1 deletion plan9/pwd_plan9.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 !go1.5
// +build !go1.5

package plan9

Expand Down
1 change: 0 additions & 1 deletion plan9/race.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 plan9 && race
// +build plan9,race

package plan9

Expand Down
1 change: 0 additions & 1 deletion plan9/race0.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 plan9 && !race
// +build plan9,!race

package plan9

Expand Down
1 change: 0 additions & 1 deletion plan9/str.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 plan9
// +build plan9

package plan9

Expand Down
Loading

0 comments on commit 1bfbee0

Please sign in to comment.