From 2e3c2705b98351bc95d01d42ab535f3dc230c593 Mon Sep 17 00:00:00 2001 From: Louis Opter Date: Fri, 15 Dec 2023 09:31:00 -0800 Subject: [PATCH] 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 --- doc/languages-frameworks/go.section.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md index 884ebcebf7f2..7f069c687ff1 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}" ];