You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recompiled the standard library with the intention of stripping out GOROOT from the paths.
go install -a -asmflags="all=-trimpath=$GOROOT/src" -gcflags="all=-trimpath=$GOROOT/src" std
I then built a sample binary (just a simple "hello world" program) against this new standard library, and ran strings on the resulting binary.
What did you expect to see?
I expected to see the trimmed version of all standard library paths (e.g., "fmt/print.go" instead of "/usr/local/go/src/fmt/print.go").
What did you see instead?
I see the untrimmed paths. This is a regression from 1.8, where doing the following results in a properly trimmed binary.
go install -a -asmflags="-trimpath=$GOROOT/src" -gcflags="-trimpath=$GOROOT/src" std
Curiously, this only appears to be an issue for the standard library. Trimming $GOPATH/src from my packages works as expected. I'm not sure where these strings are coming from, as everything in $GOROOT/pkg appears to be properly trimmed.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
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?
I recompiled the standard library with the intention of stripping out GOROOT from the paths.
go install -a -asmflags="all=-trimpath=$GOROOT/src" -gcflags="all=-trimpath=$GOROOT/src" std
I then built a sample binary (just a simple "hello world" program) against this new standard library, and ran
strings
on the resulting binary.What did you expect to see?
I expected to see the trimmed version of all standard library paths (e.g., "fmt/print.go" instead of "/usr/local/go/src/fmt/print.go").
What did you see instead?
I see the untrimmed paths. This is a regression from 1.8, where doing the following results in a properly trimmed binary.
go install -a -asmflags="-trimpath=$GOROOT/src" -gcflags="-trimpath=$GOROOT/src" std
Curiously, this only appears to be an issue for the standard library. Trimming $GOPATH/src from my packages works as expected. I'm not sure where these strings are coming from, as everything in $GOROOT/pkg appears to be properly trimmed.
The text was updated successfully, but these errors were encountered: