I've cloned the Go source and applied the change with
but when I try to build with src/all.bash (using either go 1.15.2 or go 1.14.9, on macOS Catalina), I get:
/Users/david/Projects/Scratch/goroot/src/cmd/internal/obj/dwarf.go:49: s.Func.Text undefined (type func() *FuncInfo has no field or method Text)
followed by a bunch of similar errors. (Note that neither dwarf.go nor funcinfo.go are involved in the prototype patchset.)
Figuring the tree might have been in a broken state at the time the prototype was committed, I then tried cherry-picking the commit (95a456f) on top of the go1.15.2 release tag. This got me past the error above, but the build then failed with:
go tool dist: FAILED: /Users/david/Projects/Scratch/goroot/pkg/tool/darwin_amd64/compile -std -pack -o /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/load/_go_.a -p cmd/go/internal/load -importcfg /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/load/importcfg /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/flag.go /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/path.go /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/pkg.go /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/search.go /Users/david/Projects/Scratch/goroot/src/cmd/go/internal/load/test.go: exit status 2
go tool dist: open /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/modfetch/codehost/_go_.a: no such file or directory
go tool dist: open /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/load/_go_.a: no such file or directory
go tool dist: open /var/folders/mq/dw4wtwsn7dlb_q99_qcd9kdc0000gn/T/go-tool-dist-150877791/cmd/go/internal/version/_go_.a: no such file or directory
I assume that I'm doing this wrong, and that there's a right way to be doing it -- what is the right way?