Remove "-s" and "-w" from the ldflags example

The go linker `-s` and `-w` flags respectively are for:

- Omit the symbol table and debug information.
- Omit the DWARF symbol table.

Those actions should be delegated to the fixup build phase instead.

See: https://discourse.nixos.org/t/why-do-so-many-go-packages-use-s-w-in-their-ldflags-it-breaks-dontfixup-dontstrip/36843
This commit is contained in:
Louis Opter 2023-12-15 09:31:00 -08:00 committed by GitHub
parent d17c5a31dc
commit 2e3c2705b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,6 @@ Arguments to pass to the Go linker tool via the `-ldflags` argument of `go build
```nix
ldflags = [
"-s" "-w"
"-X main.Version=${version}"
"-X main.Commit=${version}"
];