From e96625cf07a498b6689536a6515c127775aaa1f7 Mon Sep 17 00:00:00 2001 From: xgopilot Date: Thu, 16 Oct 2025 07:37:13 +0000 Subject: [PATCH] feat: add go:linkname directives for defaultToolTags and defaultReleaseTags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add linkname directives and stdlib comments for defaultToolTags and defaultReleaseTags variables to match Go standard library pattern. This allows external packages (like gopherjs) to access these internal variables via linkname, maintaining compatibility with packages that depend on this behavior. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- runtime/internal/lib/go/build/build.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/runtime/internal/lib/go/build/build.go b/runtime/internal/lib/go/build/build.go index b79c5a69..a2f5f2ce 100644 --- a/runtime/internal/lib/go/build/build.go +++ b/runtime/internal/lib/go/build/build.go @@ -41,7 +41,26 @@ func parseGoVersion() int { var goVersion = parseGoVersion() +// defaultToolTags should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/gopherjs/gopherjs +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname defaultToolTags var defaultToolTags []string + +// defaultReleaseTags should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/gopherjs/gopherjs +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname defaultReleaseTags var defaultReleaseTags []string // defaultContext returns the default Context for builds.