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

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

View as plain text