1 # golang.org/issue/46347: a stale runtime/cgo should only force a single rebuild
7 # If we set a unique CGO_CFLAGS, the installed copy of runtime/cgo
8 # should be reported as stale.
10 env CGO_CFLAGS=-DTestScript_cgo_stale=true
14 # If we then build a package that uses cgo, runtime/cgo should be rebuilt and
15 # cached with the new flag, but not installed to GOROOT (and thus still stale).
17 env GOCACHE=$WORK/cache # Use a fresh cache to avoid interference between runs.
20 stderr '[/\\]cgo'$GOEXE'["]? .* -importpath runtime/cgo'
24 # After runtime/cgo has been rebuilt and cached, it should not be rebuilt again
25 # even though it is still reported as stale.
28 ! stderr '[/\\]cgo'$GOEXE'["]? .* -importpath runtime/cgo'