Skip to content

Commit 1bfbee0

Browse files
dmitshurgopherbot
authored andcommitted
all: update go directive to 1.18
Done with: go get [email protected] 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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 1d9f0b6 commit 1bfbee0

File tree

418 files changed

+24
-534
lines changed

Some content is hidden

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

418 files changed

+24
-534
lines changed

cpu/asm_aix_ppc64.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

cpu/cpu_aix.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 aix
6-
// +build aix
76

87
package cpu
98

cpu/cpu_arm64.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

cpu/cpu_gc_arm64.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 cpu
98

cpu/cpu_gc_s390x.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 cpu
98

cpu/cpu_gc_x86.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 (386 || amd64 || amd64p32) && gc
6-
// +build 386 amd64 amd64p32
7-
// +build gc
86

97
package cpu
108

cpu/cpu_gccgo_arm64.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 cpu
98

cpu/cpu_gccgo_s390x.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 cpu
98

cpu/cpu_gccgo_x86.c

-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 (386 || amd64 || amd64p32) && gccgo
6-
// +build 386 amd64 amd64p32
7-
// +build gccgo
86

97
#include <cpuid.h>
108
#include <stdint.h>

cpu/cpu_gccgo_x86.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 (386 || amd64 || amd64p32) && gccgo
6-
// +build 386 amd64 amd64p32
7-
// +build gccgo
86

97
package cpu
108

cpu/cpu_linux.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 !386 && !amd64 && !amd64p32 && !arm64
6-
// +build !386,!amd64,!amd64p32,!arm64
76

87
package cpu
98

cpu/cpu_linux_mips64x.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 linux && (mips64 || mips64le)
6-
// +build linux
7-
// +build mips64 mips64le
86

97
package cpu
108

cpu/cpu_linux_noinit.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 linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
6-
// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x
76

87
package cpu
98

cpu/cpu_linux_ppc64x.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 linux && (ppc64 || ppc64le)
6-
// +build linux
7-
// +build ppc64 ppc64le
86

97
package cpu
108

cpu/cpu_loong64.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 loong64
6-
// +build loong64
76

87
package cpu
98

cpu/cpu_mips64x.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 mips64 || mips64le
6-
// +build mips64 mips64le
76

87
package cpu
98

cpu/cpu_mipsx.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 mips || mipsle
6-
// +build mips mipsle
76

87
package cpu
98

cpu/cpu_other_arm.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 !linux && arm
6-
// +build !linux,arm
76

87
package cpu
98

cpu/cpu_other_arm64.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 !linux && !netbsd && !openbsd && arm64
6-
// +build !linux,!netbsd,!openbsd,arm64
76

87
package cpu
98

cpu/cpu_other_mips64x.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 !linux && (mips64 || mips64le)
6-
// +build !linux
7-
// +build mips64 mips64le
86

97
package cpu
108

cpu/cpu_other_ppc64x.go

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

55
//go:build !aix && !linux && (ppc64 || ppc64le)
6-
// +build !aix
7-
// +build !linux
8-
// +build ppc64 ppc64le
96

107
package cpu
118

cpu/cpu_other_riscv64.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 !linux && riscv64
6-
// +build !linux,riscv64
76

87
package cpu
98

cpu/cpu_ppc64x.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 ppc64 || ppc64le
6-
// +build ppc64 ppc64le
76

87
package cpu
98

cpu/cpu_riscv64.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 riscv64
6-
// +build riscv64
76

87
package cpu
98

cpu/cpu_s390x.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

cpu/cpu_wasm.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
6-
// +build wasm
76

87
package cpu
98

cpu/cpu_x86.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 386 || amd64 || amd64p32
6-
// +build 386 amd64 amd64p32
76

87
package cpu
98

cpu/cpu_x86.s

-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 (386 || amd64 || amd64p32) && gc
6-
// +build 386 amd64 amd64p32
7-
// +build gc
86

97
#include "textflag.h"
108

cpu/endian_big.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 armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6-
// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
76

87
package cpu
98

cpu/endian_little.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 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
6-
// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm
76

87
package cpu
98

cpu/proc_cpuinfo_linux.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 linux && arm64
6-
// +build linux,arm64
76

87
package cpu
98

cpu/runtime_auxv_go121.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 go1.21
6-
// +build go1.21
76

87
package cpu
98

cpu/runtime_auxv_go121_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 go1.21
6-
// +build go1.21
76

87
package cpu
98

cpu/syscall_aix_gccgo.go

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// gccgo's libgo and thus must not used a CGo method.
1010

1111
//go:build aix && gccgo
12-
// +build aix,gccgo
1312

1413
package cpu
1514

cpu/syscall_aix_ppc64_gc.go

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// (See golang.org/issue/32102)
88

99
//go:build aix && ppc64 && gc
10-
// +build aix,ppc64,gc
1110

1211
package cpu
1312

execabs/execabs_go118.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 !go1.19
6-
// +build !go1.19
76

87
package execabs
98

execabs/execabs_go119.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 go1.19
6-
// +build go1.19
76

87
package execabs
98

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module golang.org/x/sys
22

3-
go 1.17
3+
go 1.18

plan9/mksyscall.go

+2-9
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
/*
98
This program reads a file containing function prototypes
@@ -55,11 +54,6 @@ func goBuildTags() string {
5554
return strings.ReplaceAll(*tags, ",", " && ")
5655
}
5756

58-
// buildTags returns build tags in the +build format.
59-
func buildTags() string {
60-
return *tags
61-
}
62-
6357
// Param is function parameter
6458
type Param struct {
6559
Name string
@@ -123,7 +117,7 @@ func main() {
123117
}
124118

125119
libc := false
126-
if goos == "darwin" && strings.Contains(buildTags(), ",go1.12") {
120+
if goos == "darwin" && strings.Contains(goBuildTags(), " && go1.12") {
127121
libc = true
128122
}
129123
trampolines := map[string]bool{}
@@ -383,14 +377,13 @@ func main() {
383377
}
384378
file.Close()
385379
}
386-
fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), plusBuildTags(), text)
380+
fmt.Printf(srcTemplate, cmdLine(), goBuildTags(), text)
387381
}
388382

389383
const srcTemplate = `// %s
390384
// Code generated by the command above; see README.md. DO NOT EDIT.
391385
392386
//go:build %s
393-
// +build %s
394387
395388
package plan9
396389

plan9/pwd_go15_plan9.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 go1.5
6-
// +build go1.5
76

87
package plan9
98

plan9/pwd_plan9.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 !go1.5
6-
// +build !go1.5
76

87
package plan9
98

plan9/race.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 plan9 && race
6-
// +build plan9,race
76

87
package plan9
98

plan9/race0.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 plan9 && !race
6-
// +build plan9,!race
76

87
package plan9
98

plan9/str.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 plan9
6-
// +build plan9
76

87
package plan9
98

0 commit comments

Comments
 (0)