go/src/cmd
Christian Stewart b3b8d2bfeb cmd/dist: use gohostarch for ssa rewrite check
Fix a build failure when bootstrapping the Go compiler with go-bootstrap 1.4
while the environment contains GOARCH=riscv64.

Building Go toolchain1 using go-1.4-bootstrap-20171003.
src/cmd/compile/internal/ssa/rewriteRISCV64.go:4814
invalid operation: y << x (shift count type int64, must be unsigned integer)

This is because:

 - buildtool.go:198: calls bootstrapRewriteFile(src)
 - bootstrapRewriteFile: buildtool.go:283 calls:
 - isUnneededSSARewriteFile: checks os.Getenv("GOARCH")
 - isUnneededSSARewriteFile: returns "", false
 - bootstrapRewriteFile: calls bootstrapFixImports
 - boostrapFixImports: generates code go1.4 cannot compile

Instead of checking "GOARCH" in the environment, use the gohostarch variable.

Change-Id: Ie9c190498555c4068461fead6278a62e924062c6
GitHub-Last-Rev: 300d7a7fea
GitHub-Pull-Request: golang/go#52362
Reviewed-on: https://go-review.googlesource.com/c/go/+/400376
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
2022-06-02 17:15:54 +00:00
..
addr2line all: gofmt main repo 2022-04-11 16:34:30 +00:00
api all: REVERSE MERGE dev.boringcrypto (cdcb4b6) into master 2022-05-02 22:12:49 -04:00
asm cmd/internal/obj/arm64: fix encoding of ADR/ADRP instruction 2022-05-23 21:58:35 +00:00
buildid all: gofmt main repo 2022-04-11 16:34:30 +00:00
cgo cmd/cgo: allow DW_TAG_variable's with no name 2022-05-20 21:03:28 +00:00
compile cmd/compile: fix wrong unsafe.Offsetof evaluation inside generic function 2022-05-31 14:58:09 +00:00
cover all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
dist cmd/dist: use gohostarch for ssa rewrite check 2022-06-02 17:15:54 +00:00
doc all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
fix all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
go cmd/go: add index creation methods 2022-06-01 20:20:50 +00:00
gofmt cmd/gofmt: use SkipObjectResolution with -s as well 2022-05-19 20:06:14 +00:00
internal cmd/dist: support spaces and quotes in CC 2022-05-26 20:14:15 +00:00
link cmd/link: call syscall.FlushFileBuffers on outbuf Unmap 2022-05-31 11:37:38 +00:00
nm cmd/nm, cmd/objdump, cmd/pprof: disassembly is not supported on loong64 2022-05-17 18:19:34 +00:00
objdump all: fix spelling 2022-05-17 19:51:29 +00:00
pack all: gofmt main repo 2022-04-11 16:34:30 +00:00
pprof all: gofmt main repo 2022-05-19 15:49:05 +00:00
test2json all: use os/exec instead of internal/execabs 2022-05-02 17:49:12 +00:00
trace doc: lint Markdown for trailing spaces and code blocks 2022-05-27 15:07:38 +00:00
vendor vendor: revert stray edit from CL 406835 2022-05-17 20:59:58 +00:00
vet all: gofmt main repo 2022-04-11 16:34:30 +00:00
README.vendor
go.mod cmd/pprof: update vendored github.com/google/pprof 2022-05-17 14:39:18 +00:00
go.sum cmd/pprof: update vendored github.com/google/pprof 2022-05-17 14:39:18 +00:00

README.vendor

See src/README.vendor for information on loading vendored packages
and updating the vendor directory.