Skip to content

DRAFT: buildGo{Module,Package}: add defaultLdflags -s -w - #182743

Closed
zowoq wants to merge 1 commit into
NixOS:stagingfrom
qowoz:go-defaultldflags
Closed

zowoq wants to merge 1 commit into
NixOS:stagingfrom
qowoz:go-defaultldflags

Conversation

@zowoq

@zowoq zowoq commented Jul 24, 2022

Copy link
Copy Markdown
Contributor

https://pkg.go.dev/cmd/link
-s
Omit the symbol table and debug information.
-w
Omit the DWARF symbol table.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions Bot added the 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. label Jul 24, 2022
@zowoq zowoq changed the title buildGo{Module,Package}: add defaultLdflags -s -w DRAFT: buildGo{Module,Package}: add defaultLdflags -s -w Jul 24, 2022
@zowoq zowoq self-assigned this Jul 24, 2022
@ofborg ofborg Bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Jul 24, 2022
@ofborg
ofborg Bot requested review from fpletz, globin, talyz and yayayayaka July 25, 2022 06:36
@yayayayaka
yayayayaka requested a review from yu-re-ka July 25, 2022 12:37
@github-actions github-actions Bot added the 8.has: documentation This PR adds or changes documentation label Jul 26, 2022
@zowoq

zowoq commented Sep 1, 2022

Copy link
Copy Markdown
Contributor Author

#177698 (comment)

@zowoq zowoq closed this Sep 1, 2022
@zowoq
zowoq deleted the go-defaultldflags branch September 1, 2022 05:25
@zowoq zowoq removed their assignment Apr 5, 2025
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: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buildGoModule: Binaries are not stripped by default. Proposal to add -s -w ldflags by default

1 participant