about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorLouis Opter <louis@opter.org>2023-12-15 09:31:00 -0800
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-12-22 05:04:34 +0000
commit602480aa27078a0e1384d3d245b4b7a6a24baab5 (patch)
tree422a7c600a82351903b4dfee9427aa8238a5aaea /doc
parent0b3d618173114c64ab666f557504d6982665d328 (diff)
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)
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/go.section.md1
1 files changed, 0 insertions, 1 deletions
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}"
   ];