aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2022-11-03 11:56:43 -0700
committerMatthew Dempsky <mdempsky@google.com>2022-11-03 20:35:31 +0000
commitaa6240a445d2478f29add6218b19147f5bf2204f (patch)
tree688b2e2abf4d1d82429c137e30a1a464df1e9184 /src/os/exec
parent48ff5c1042af780dade9f539368e8bc2259d2679 (diff)
downloadgo-aa6240a445d2478f29add6218b19147f5bf2204f.tar.xz
cmd/compile: allow ineffectual //go:linkname in -lang=go1.17 and older
Prior to Go 1.18, ineffectual //go:linkname directives (i.e., directives referring to an undeclared name, or to a declared type or constant) were treated as noops. In Go 1.18, we changed this into a compiler error to mitigate accidental misuse. However, the x/sys repo contained ineffectual //go:linkname directives up until go.dev/cl/274573, which has caused a lot of user confusion. It seems a bit late to worry about now, but to at least prevent further user pain, this CL changes the error message to only apply to modules using "go 1.18" or newer. (The x/sys repo declared "go 1.12" at the time go.dev/cl/274573 was submitted.) Fixes #55889. Change-Id: Id762fff96fd13ba0f1e696929a9e276dfcba2620 Reviewed-on: https://go-review.googlesource.com/c/go/+/447755 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/os/exec')
0 files changed, 0 insertions, 0 deletions