-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: report trimpath erasing ldflags, and allow override #67072
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
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: 8edb3c2) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/582055. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/582055. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/582055. |
This PR (HEAD: 71d1aa8) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/582055. Important tips:
|
Message from Dimitri John Ledkov: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/582055. |
Message from Michael Matloob: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/582055. |
Add a new boolean option -trimldflags. Only meaningful when -trimpath is true. Defaults to true for backwards compatibility. Otheriwise when set to false reports ldflags in buildinfo, in spite of -trimpath setting. Also when ldflags are trimmed from the output, leave a reproducible marker that it happened. Building with '-trimpath -ldflags="-X main.Version=234"' will now emit: build -trimldflags=true Adding -trimldflags=false to the above will emit ldflags: build -ldflags="-X main.Version=234" Fixes: golang#63432 Change-Id: I47d633ef0e6a90136799bef9701b7ff22c92f095 GitHub-Pull-Request: golang#67072
This PR (HEAD: 0355b6a) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/582055. Important tips:
|
Add a new boolean option -trimldflags. Only meaningful when -trimpath
is true. Defaults to true for backwards compatibility. Otheriwise when
set to false reports ldflags in buildinfo, in spite of -trimpath
setting. Also when ldflags are trimmed from the output, leave a
reproducible marker that it happened.
Building with '-trimpath -ldflags="-X main.Version=234"' will now emit:
build -trimldflags=true
Adding -trimldflags=false to the above will emit ldflags:
build -ldflags="-X main.Version=234"
Fixes: #63432