diff options
| author | Keith Randall <khr@golang.org> | 2022-10-20 14:20:41 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2023-02-16 00:16:24 +0000 |
| commit | 55044288ad22f0c46ac55375ed9ef3de1babb77c (patch) | |
| tree | bbb4c7a8682272d27e21b877d14bed24363e84b6 /src/runtime/runtime1.go | |
| parent | 44d22e75dd9a0cbffbb04c9ce6d6bf9030634cc1 (diff) | |
| download | go-55044288ad22f0c46ac55375ed9ef3de1babb77c.tar.xz | |
runtime: reimplement GODEBUG=cgocheck=2 as a GOEXPERIMENT
Move this knob from a binary-startup thing to a build-time thing.
This will enable followon optmizations to the write barrier.
Change-Id: Ic3323348621c76a7dc390c09ff55016b19c43018
Reviewed-on: https://go-review.googlesource.com/c/go/+/447778
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/runtime1.go')
| -rw-r--r-- | src/runtime/runtime1.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index f5d74b7aed..991b92a0af 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -489,6 +489,10 @@ func parsegodebug(godebug string, seen map[string]bool) { } } } + + if debug.cgocheck > 1 { + throw("cgocheck > 1 mode is no longer supported at runtime. Use GOEXPERIMENT=cgocheck2 at build time instead.") + } } //go:linkname setTraceback runtime/debug.SetTraceback |
