1 [short] skip
2 [!cgo] skip
3
4 env GOCACHE=$WORK/gocache # Looking for compile flags, so need a clean cache.
5 go build -x -n main.go
6 stderr '"-I[^"]+c flags"' # find quoted c flags
7 ! stderr '"-I[^"]+c flags".*"-I[^"]+c flags"' # don't find too many quoted c flags per line
8 stderr '"-L[^"]+ld flags"' # find quoted ld flags
9 ! stderr '"-L[^"]+c flags".*"-L[^"]+c flags"' # don't find too many quoted ld flags per line
10
11 -- main.go --
12 package main
13 // #cgo CFLAGS: -I"c flags"
14 // #cgo LDFLAGS: -L"ld flags"
15 import "C"
16 func main() {}
17
View as plain text