aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist/test.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-01-27 15:25:57 -0500
committerBryan Mills <bcmills@google.com>2023-01-31 13:55:48 +0000
commitda0c375c571037ec5ea6f8ef2be8f07593b40eb6 (patch)
treea7a4727c4ad444a33d5a7a1c9c0e78a46b08bf47 /src/cmd/dist/test.go
parentf66581ead6f6dbc94b1d2fddee11abff722039e1 (diff)
downloadgo-da0c375c571037ec5ea6f8ef2be8f07593b40eb6.tar.gz
go-da0c375c571037ec5ea6f8ef2be8f07593b40eb6.zip
cmd/dist: leave cgo enabled if external linking is required
Certain ios and android configurations do not yet support internal linking. On ios, attempting to build without cgo causes tests to fail on essentially every run (#57961). On android, it produces a lot of warning spam from the linker, obscuring real problems. Since external linking makes the result of `go install` depend on the installed C toolchain either way, the reproducibility benefit of disabling cgo seems minimal on these platforms anyway. Fixes #57961. For #24904. Updates #57007. Change-Id: Ied2454804e958dd670467db3d5e9ab50a40bb899 Reviewed-on: https://go-review.googlesource.com/c/go/+/463739 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Bypass: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/dist/test.go')
-rw-r--r--src/cmd/dist/test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index bdf389fea4..189cfd0590 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -149,7 +149,7 @@ func (t *tester) run() {
if t.rebuild {
t.out("Building packages and commands.")
// Force rebuild the whole toolchain.
- goInstall(toolenv, gorootBinGo, append([]string{"-a"}, toolchain...)...)
+ goInstall(toolenv(), gorootBinGo, append([]string{"-a"}, toolchain...)...)
}
if !t.listMode {
@@ -166,9 +166,9 @@ func (t *tester) run() {
// and virtualization we usually start with a clean GOCACHE, so we would
// end up rebuilding large parts of the standard library that aren't
// otherwise relevant to the actual set of packages under test.
- goInstall(toolenv, gorootBinGo, toolchain...)
- goInstall(toolenv, gorootBinGo, toolchain...)
- goInstall(toolenv, gorootBinGo, "cmd")
+ goInstall(toolenv(), gorootBinGo, toolchain...)
+ goInstall(toolenv(), gorootBinGo, toolchain...)
+ goInstall(toolenv(), gorootBinGo, "cmd")
}
}