]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/cgo: disable #cgo noescape/nocallback until Go 1.23
authorRuss Cox <rsc@golang.org>
Thu, 2 Nov 2023 12:15:44 +0000 (08:15 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 2 Nov 2023 16:43:23 +0000 (16:43 +0000)
commit607e020150f1bba84beec11aceadbc42abf33986
tree28263d9990b4dee989d6724513a068836106113a
parent5622a4b2054664edcdd64974b9df73b440aedfae
cmd/cgo: disable #cgo noescape/nocallback until Go 1.23

Go 1.21 and earlier do not understand this line, causing
"go mod vendor" of //go:build go1.22-tagged code that
uses this feature to fail.

The solution is to include the go/build change to skip over
the line in Go 1.22 (making "go mod vendor" from Go 1.22 onward
work with this change) and then wait to deploy the cgo change
until Go 1.23, at which point Go 1.21 and earlier will be unsupported.

For #56378.
Fixes #63293.

Change-Id: Ifa08b134eac5a6aa15d67dad0851f00e15e1e58b
Reviewed-on: https://go-review.googlesource.com/c/go/+/539235
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
doc/go1.22.html
src/cmd/cgo/doc.go
src/cmd/cgo/gcc.go
src/cmd/cgo/internal/test/test.go
src/cmd/cgo/internal/testerrors/testdata/notmatchedcfunction.go
src/runtime/crash_cgo_test.go
src/runtime/testdata/testprogcgo/cgonocallback.go
src/runtime/testdata/testprogcgo/cgonoescape.go