github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/go/testdata/script/build_cache_link.txt (about) 1 # Set up fresh GOCACHE. 2 env GOCACHE=$WORK/gocache 3 mkdir $GOCACHE 4 5 # Building a main package should run the compiler and linker ... 6 go build -o $devnull -x main.go 7 stderr '(compile|gccgo)( |\.exe).*main\.go' 8 stderr '(link|gccgo)( |\.exe)' 9 10 # ... and then the linker again ... 11 go build -o $devnull -x main.go 12 ! stderr '(compile|gccgo)( |\.exe).*main\.go' 13 stderr '(link|gccgo)( |\.exe)' 14 15 # ... but the output binary can serve as a cache. 16 go build -o main$exe -x main.go 17 stderr '(link|gccgo)( |\.exe)' 18 go build -o main$exe -x main.go 19 ! stderr '(link|gccgo)( |\.exe)' 20 21 -- main.go -- 22 package main 23 func main() {}