-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/build: -trimpath is ignored when forcefully passing -gcflags=-trimpath=$SOMETHING #66849
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
Comments
This is a very old version of go, does that works with one of the maintained release (1.22.2 or 1.21.9) ? It would also help if you give a complete build command, or repro. I guess you might have pointed |
Yes @Jorropo, I have ran the go build on a file, but I think this might be same even for the folder as well.
|
Ah, the problem is that you set Everything works fine for me when I set TL;DR try:
|
We might be able to error on this ( |
@Jorropo : just plain simple |
Go version
go version go1.16.15b7p1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I have compiled a Go binary using the below flags and it has a runtime exception and dumped the below Stacktrace.
My GOPATH =
/home/hemant/dev/go/src
My compiler flags while building are:
-gcflags=-trimpath=$GOPATH -trimpath -asmflags=-trimpath=$GOPATH -trimpath
Stacktrace is below:
What did you see happen?
I have an issue where the -trimpath is not removing the GOPATH
/home/hemant/dev/go/src/
from the last line of the stacktrace.What did you expect to see?
GOPATH should have been removed from the last line also.
Also side question: Is it possible to NOT expose directory path also and have mere filename ?
The text was updated successfully, but these errors were encountered: