Commit 79384420 authored by Austin Clements's avatar Austin Clements
Browse files

cmd/go: strip GOEXPERIMENT from hash salt

The go command salts cache hashes using runtime.Version() (the Go
version the go command was built with) in order to separate objects
built with different versions of Go.

CL 307820 added the active GOEXPERIMENTs to the result of
runtime.Version, which affected cmd/go's hash salt. Since dist builds
go_bootstrap with all GOEXPERIMENTs disabled, but then go_bootstrap
builds the final go binary with the GOEXPERIMENTs passed to make.bash,
if any GOEXPERIMENTs were passed, go_bootstrap and the final go binary
produce different cache hashes. At the very end of dist, it uses the
final go binary to check the hashes of all packages, but these hashes
were produced by go_bootstrap, so it concludes everything is stale.

This should fix the builders that enable GOEXPERIMENTs, including the
regabi and staticlockranking builders.

Change-Id: Ie389929dff6f7b6eff2b19a2f43507e72be5f32e
Reviewed-on: https://go-review.googlesource.com/c/go/+/308591


Trust: Austin Clements <austin@google.com>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
parent 98dd205f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment