tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: go: shrink binaries
Hi!
On Mon, May 25, 2026 at 09:00:22AM +0100, Adam Ciarciński wrote:
> To all go modules, can we add:
>
> -ldflags='-s -w' to omit symbol table (-s) and strip debug information (-w), and also
Perhaps make this part conditional on INSTALL_UNSTRIPPED being set to
'no'.
> -trimpath to avoid baking full GOPATH/module paths into binaries (without it, there is a work directory reference, so CHECK_WRKREF_SKIP can possible be removed in lang/go/go-module.mk)
Neat!
> But GOFLAGS won't propagate, because many packages override it.
>
> Is there a better way to achieve this?
Perhaps we can change the packages to use += ?
Thomas
Home |
Main Index |
Thread Index |
Old Index