...

Text file src/cmd/go/testdata/script/build_cache_compile.txt

Documentation: cmd/go/testdata/script

     1env GO111MODULE=off
     2[short] skip
     3
     4# Set up fresh GOCACHE.
     5env GOCACHE=$WORK/gocache
     6mkdir $GOCACHE
     7
     8# Building trivial non-main package should run compiler the first time.
     9go build -x lib.go
    10stderr '(compile|gccgo)( |\.exe).*lib\.go'
    11
    12# ... but not again ...
    13go build -x lib.go
    14! stderr '(compile|gccgo)( |\.exe).*lib\.go'
    15
    16# ... unless we use -a.
    17go build -a -x lib.go
    18stderr '(compile|gccgo)( |\.exe)'
    19
    20-- lib.go --
    21package lib

View as plain text