[Bug 285251] Mk/Uses/go.mk: Introduce GO_LDFLAGS

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 09 Mar 2025 02:39:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285251

--- Comment #1 from Adam Weinberger <adamw@FreeBSD.org> ---
From `go doc link` (https://pkg.go.dev/cmd/link):

-s
        Omit the symbol table and debug information.
        Implies the -w flag, which can be negated with -w=0.

So, adding -w is unnecessary here.

It should be very rare for a FreeBSD pkg to be built without -s, so I'm not
sure about gating it behind empty(GO_BUILDFLAGS:M-ldflags*). What about keeping
just the .if !defined(WITH_DEBUG)? If I need to define an -X variable, I
wouldn't want debugging symbols to appear.

-- 
You are receiving this mail because:
You are the assignee for the bug.