Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add -ldflags -s and -w tests to all.bash #19753

Closed
FiloSottile opened this issue Mar 29, 2017 · 2 comments
Closed

test: add -ldflags -s and -w tests to all.bash #19753

FiloSottile opened this issue Mar 29, 2017 · 2 comments

Comments

@FiloSottile
Copy link
Contributor

The -s and -w linker flags are documented, commonly recommended (a bit my fault I guess), and mentioned as a workaround by a few issues (#11887, #19734).

However, they are associated to the folklore about strip(1) breaking binaries (which happens and is not Go's problem) and apparently not tested as part of the release process (https://twitter.com/davecheney/status/846844080227213312).

I'll try to find a bit of time to find out how the linker artifacts are tested and add rounds with -w, -s and both, but of course I'd be happy for someone to jump on it first.

@rsc
Copy link
Contributor

rsc commented Mar 29, 2017

We already build test binaries with -w when not leaving the binary behind. That is, if you run 'go test strings', the test binary (which is written to a temp directory, executed, and deleted) has no DWARF debug information, because why bother. So I'm quite sure that -w works just fine. We could add -s too.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/38742 mentions this issue.

@golang golang locked and limited conversation to collaborators Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants