]> Cypherpunks repositories - gostls13.git/commit
cmd/dist: leave cgo enabled if external linking is required
authorBryan C. Mills <bcmills@google.com>
Fri, 27 Jan 2023 20:25:57 +0000 (15:25 -0500)
committerBryan Mills <bcmills@google.com>
Tue, 31 Jan 2023 13:55:48 +0000 (13:55 +0000)
commitda0c375c571037ec5ea6f8ef2be8f07593b40eb6
treea7a4727c4ad444a33d5a7a1c9c0e78a46b08bf47
parentf66581ead6f6dbc94b1d2fddee11abff722039e1
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>
src/cmd/dist/build.go
src/cmd/dist/build_test.go [new file with mode: 0644]
src/cmd/dist/test.go