4 ms·
You can cut your binary size almost in half on Linux by removing debug information and symbols with: `go build -ldflags="-s -w"`
by marcrosoft 8y ago
You can cut your binary size almost in half on Linux by removing debug information and symbols with:
`go build -ldflags="-s -w"`
- Something1234 8y agoI thought it was dangerous to use `strip` on any go binaries, because it would result in an incorrect program. LDFlags might cause something else but isn't it the same concept?