cmd/go: link should stop when cgo is required but disabled #46330
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
It also reproduces with go1.17 devel.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Using https://play.golang.org/p/LqHgq34kmVq:
What I'm doing is to check if my package is buildable for the specified platform.
What did you expect to see?
An error, reporting that cgo is required for the platform but explicitly disabled by the user. The program should exit, instead of continuing.
What did you see instead?
android/arm
reports:android/amd64
andandroid/arm64
worksios/amd64
andios/arm64
reports:The text was updated successfully, but these errors were encountered: