tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: go: shrink binaries



On 5/25/26 9:00 AM, Adam wrote:
Hello,

To all go modules, can we add:

-ldflags='-s -w' to omit symbol table (-s) and strip debug information (-w), and also
-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)

I wouldn't want to strip symbol tables by default, that can make any debugging a lot more painful for little gain. Debug information is a different question.

Joerg


Home | Main Index | Thread Index | Old Index