-
Notifications
You must be signed in to change notification settings - Fork 91
Remove debug info from final binary #1330
Remove debug info from final binary #1330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Please rebase.
2f7945b
to
5685a7d
Compare
/lgtm |
/retest |
3 similar comments
/retest |
/retest |
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sadlerap The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I think something might be wrong with 4.9-acceptance tests, though I'm not entirely certain what. |
5685a7d
to
37023cf
Compare
/retest |
Looks like OLM is failing in its install with this message:
|
Signed-off-by: Francesco Ilario <[email protected]>
37023cf
to
feff14e
Compare
/lgtm |
Changes
Use
-ldflags="-s -w"
and-trimpath
ingo build
to strip debug tables and system paths from final binary.From https://pkg.go.dev/cmd/link:
-s
: Omit the symbol table and debug information-w
: Omit the DWARF symbol table.From https://pkg.go.dev/cmd/go:
trimpath
: remove all file system paths from the resulting executable. Instead of absolute file system paths, the recorded file names will begin either a module path@version (when using modules), or a plain import path (when using the standard library, or GOPATH)./kind enhancement
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
included if any changes are user facing
included if any functionality added or changed. For bugfixes please include tests that can catch regressions
@external-feedback
tag.