3 ms·
It didn't even remove the leading prefix for me. I tried both forward and backward slashes. (The version in the binary is with forward slashes.) Note that I'm u
by mehrdadn 8y ago
It didn't even remove the leading prefix for me. I tried both forward and backward slashes. (The version in the binary is with forward slashes.) Note that I'm using go1.10.3.windows-amd64.zip.
EDIT: Looking more carefully, it seems like it actually removes the prefix for files in the current module, but nothing from files in its dependencies. This is despite the fact that both of them share a prefix for me, and that's what I'm trying to remove. Any idea why?
- mappu 8y agoThis changed from 1.9 -> 1.10, now the asm/gc/ldflags only apply to the module being compiled directly, not other modules. https://golang.org/doc/go1.10#build https://golang.org/doc/go1.10#build You can resolve this by using "all" as the pattern (-gcflags=all=-trimpath=$GOPATH)
- mehrdadn 8y agoAhh!! Okay thanks, that works... almost. Now there's still one spot left where the path of the Go installation is embedded... :\