Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break reliance on GOROOT_FINAL (#3984)
* Clear GOROOT when linking Due to golang/go#62047, Go 1.23 won't support `GOROOT_FINAL`. This means that #971 will no longer fix #969, meaning linked binaries will contain full GOROOT paths, making them non-reproducible. Instead of using `GOROOT_FINAL`, this change sets `GOROOT` when invoking the linker, which will cause the linker to continue to write `GOROOT` into the binary, keeping builds consistent. This works on Go 1.23rc1 as well. I'm not a rules_go expert and I'm not married to this particular solution, I just wanted to bring attention to the issue. If there's a clever way we can set `-trimpath` when invoking the compiler, that might be better - but we already use that flag to trim off the bazel sandbox I believe. * switch based on runtime.Version
- Loading branch information