1
0
mirror of https://github.com/golang/go synced 2024-11-23 04:00:03 -07:00
go/misc
Bryan C. Mills 7bc8aacec1 misc/android: rework GOROOT installation
- Fall back to 'go env GOROOT' to locate GOROOT if runtime.GOROOT() is
  empty (as may be the case if the tool is built with -trimpath).

- Copy all of $GOROOT/android_$GOARCH/bin, not just cmd/go, to
  $GOROOT/bin.

- For consistency with CL 404134, place $GOROOT/bin at the beginning
  of $PATH, not the end.

- Don't use the install target for the "runtime" package to locate pkg/tool.
  As of Go 1.20 "runtime" doesn't have an install directory anyway.
  Since the real reason we need pkg/tool is for commands in "cmd",
  use an arbitrary command (namely "cmd/compile") to locate it.

- Use 'go list' to determine the package import path for the current
  directory, instead of assuming that it is within GOROOT or GOPATH.
  (That assumption does not hold in module mode.)

Updates #58775.

Change-Id: If76ff22bce76d05175c40678230f046a4aff0940
Reviewed-on: https://go-review.googlesource.com/c/go/+/472096
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Changkun Ou <mail@changkun.de>
Auto-Submit: Bryan Mills <bcmills@google.com>
2023-04-28 01:32:45 +00:00
..
android misc/android: rework GOROOT installation 2023-04-28 01:32:45 +00:00
arm
cgo runtime/cgo: store M for C-created thread in pthread key 2023-04-26 19:25:46 +00:00
chrome/gophertool docs: fix case of GitHub 2021-03-05 02:35:21 +00:00
ios all: gofmt main repo 2022-04-11 16:34:30 +00:00
linkcheck all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
reboot make.{bash,bat}: check unmodified $PATH for $GOROOT/bin presence 2023-04-19 14:36:22 +00:00
swig
wasm misc/wasm: default to /tmp if TMPDIR is unset 2023-04-26 21:21:32 +00:00
editors
go.mod misc: update go.mod to 1.21 2023-01-26 16:55:59 +00:00