go/src/internal
Ian Lance Taylor 0ebd5a8de0 cmd/go: update ToolTags based on GOARCH value
The build.Context ToolTags value is set based on the set of enabled
experiments, which in turn depends on GOARCH. Before this CL the set
of experiments was being set based on GOARCH in the environment.
That is normally fine, but fails with cmd/go when somebody has run
"go env -w GOARCH=val"; in that case cmd/go changes its GOARCH value
after initialization. The new GOARCH value was affect the set of
enabled experiments, which can affect the ToolTags value. With this
CL, we update ToolTags in cmd/go based on the GOARCH value it is using.

This is a pretty ugly fix. We should do something cleaner for 1.18.

Fixes #46815

Change-Id: Ie9416781a168248813c3da8afdc257acdd3fef7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/329930
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-22 16:59:10 +00:00
..
abi cmd/compile, internal/abi: add FuncPCABIxxx intrinsics 2021-04-23 21:05:39 +00:00
buildcfg cmd/go: update ToolTags based on GOARCH value 2021-06-22 16:59:10 +00:00
bytealg internal/bytealg: remove duplicate go:build line 2021-06-15 10:13:08 +00:00
cfg cmd: move GOEXPERIMENT knob from make.bash to cmd/go 2021-03-11 21:43:04 +00:00
cpu all: add //go:build lines to assembly files 2021-05-13 09:12:17 +00:00
execabs internal/execabs: replace ioutil.WriteFile with os.WriteFile 2021-04-12 21:57:23 +00:00
fmtsort internal/fmtsort: sort the unsafe pointers in map 2020-11-19 02:17:10 +00:00
goexperiment internal/buildcfg: make regabi an alias for regabi sub-experiments 2021-04-16 22:45:02 +00:00
goroot all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
goversion internal/goversion: update Version to 1.17 2021-02-16 21:07:42 +00:00
itoa all: add internal/itoa package 2021-03-14 17:56:50 +00:00
lazyregexp
lazytemplate
nettrace
obscuretestdata all: update to use os.ReadFile, os.WriteFile, os.CreateTemp, os.MkdirTemp 2020-12-09 19:12:23 +00:00
oserror
poll internal/poll: cast off the last reference of SplicePipe in test 2021-05-07 02:45:26 +00:00
profile all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
race all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
reflectlite cmd/compile,reflect: allow longer type names 2021-05-10 13:16:56 +00:00
singleflight
syscall internal/syscall/unix: use internal/abi.FuncPC for syscall wrapper 2021-05-03 22:59:55 +00:00
sysinfo testing: print cpu type as label for benchmarks 2020-10-20 21:30:18 +00:00
testenv all: go fmt std cmd (but revert vendor) 2021-02-20 03:54:50 +00:00
testlog cmd/go, testing, os: fail test that calls os.Exit(0) 2020-08-27 23:19:15 +00:00
trace runtime: move next_gc and last_next_gc into gcControllerState 2021-04-14 14:03:30 +00:00
unsafeheader
xcoff