From 602480aa27078a0e1384d3d245b4b7a6a24baab5 Mon Sep 17 00:00:00 2001 From: Louis Opter Date: Fri, 15 Dec 2023 09:31:00 -0800 Subject: 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 (cherry picked from commit 2e3c2705b98351bc95d01d42ab535f3dc230c593) --- doc/languages-frameworks/go.section.md | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md index 884ebcebf7f2a..7f069c687ff18 100644 --- a/doc/languages-frameworks/go.section.md +++ b/doc/languages-frameworks/go.section.md @@ -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}" ]; -- cgit 1.4.1