Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: -trimpath build flag has no effect in gccgo #32162
Go 1.13 is adding a new
The documentation says
This works with gc, but the flag has no effect in gccgo. Demo:
(This came up in CL 176112.)
Here are some things we could do to improve the situation:
Marking for 1.13 since this is a new feature and we should at least document the interaction.
The GCC/LLVM option to use to implement -trimpath is -ffile-prefix-map, which implies -fdebug-prefix-map and -fmacro-prefix-map. See https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html. This was added to LLVM in mid-2018 (https://reviews.llvm.org/D49466).