Re:Three Minor Features in Go 1.18
by cpuguy83 on Wednesday December 22, 2021 @10:14PM
(#29658261)
They are already not reproducible.
But build time is not included, it's the commit time of the commit the build comes from, from what I gather.
[ Parent
| on HN ]
Go builds are, in general, reproducible by default. Build stamps do not change this.
"reproducible by default" if the system is setup a certain way.
Build time injected into builds would absolutely break any reproducibility.
> "reproducible by default" if the system is setup a certain way
What do you mean? Under what circumstances is a Go build not reproducible? From what I’ve observed, if you build your binary with a set of input, the same binary is produced. Is it sometimes not true?
By default you need the same GOPATH and GOROOT.
Compiler version must be identical (not a huge stretch).
cgo reproducibility is not a guarantee.
It would, which is why the Go compiler and linker do not put the build time in binaries.