1
0
mirror of https://github.com/golang/go synced 2024-11-25 16:47:56 -07:00
go/misc
Austin Clements af64b75b67 misc/cgo/test: add cgo build constraints
We're about to move this package to cmd/cgo/internal, where it will
get caught up in the "CGO_ENABLED=0 go install cmd" done by make.bash.
Currently, building this package with CGO_ENABLED=0 fails because it
contains several source files that don't themselves import "C", but do
import a subdirectory where that package imports "C" and thus has no
exported API.

Fix the CGO_ENABLED=0 build of this package by adding the necessary
cgo build tags. Not all source files need it, but this CL makes
"CGO_ENABLED=0 go test -c" work in this package.

For #37486.

Change-Id: Id137cdfbdd950eea802413536d990ab642ebcd7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/493215
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
2023-05-12 12:00:00 +00:00
..
arm
cgo misc/cgo/test: add cgo build constraints 2023-05-12 12:00:00 +00:00
chrome/gophertool docs: fix case of GitHub 2021-03-05 02:35:21 +00:00
go_android_exec misc/android: improve exit code workaround 2023-05-03 14:54:58 +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 cmd/go: fix swig support and run swig tests during run.bash 2017-11-16 17:19:19 +00:00
wasm misc/wasm: add wasmedge to wasip1 script 2023-05-11 14:42:30 +00:00
editors
go.mod misc: update go.mod to 1.21 2023-01-26 16:55:59 +00:00