Skip to content

[Backport release-23.11] Golang docs: remove "-s" and "-w" from the ldflags example - #275971

Merged
NickCao merged 1 commit into
release-23.11from
backport-274503-to-release-23.11
Dec 22, 2023
Merged

NickCao merged 1 commit into
release-23.11from
backport-274503-to-release-23.11

Conversation

@github-actions

@github-actions github-actions Bot commented Dec 22, 2023 •

Copy link
Copy Markdown
Contributor

Bot-based backport to release-23.11, triggered by a label in #274503.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-commiter, if you find that it is not acceptable, leave a comment.

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 2e3c270)
@ofborg ofborg Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Dec 22, 2023
@NickCao
NickCao merged commit cfc0f15 into release-23.11 Dec 22, 2023
@github-actions github-actions Bot added 8.has: documentation This PR adds or changes documentation 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. labels Dec 22, 2023
@kalbasit
kalbasit deleted the backport-274503-to-release-23.11 branch December 22, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants