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
cmd/go: using --trimpath
in go build
removes -ldflags
from go version -m
output
#63432
Comments
See: #52372 |
Thanks ok I see now there are a couple of TODOs so this is a known issue: go/src/cmd/go/internal/load/pkg.go Line 2336 in d252fdd
Maybe just whitelisting |
@wallyqs if you'd like to make progress on that TODO, you're welcome to send a fix! 🙃 I don't think we should add a special case for |
Change https://go.dev/cl/536795 mentions this issue: |
What about removing |
What about having special info in buildinfo to mention that |
@dolmen, I think the right solution here is probably to parse the On the other hand, if we can't identify a specific variable that refers to the path passed in |
Is I'm thinking about the case where a tool that rebuilds binaries would take the raw ldflags value from a binary and pass it to |
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: