blob: b9c740ac10ea23acdb23901b3d9a113081e5d169 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
env GO111MODULE=off
[short] skip
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
# Building a main package should run the compiler and linker ...
go build -o $devnull -x main.go
stderr '(compile|gccgo)( |\.exe).*main\.go'
stderr '(link|gccgo)( |\.exe)'
# ... and then the linker again ...
go build -o $devnull -x main.go
! stderr '(compile|gccgo)( |\.exe).*main\.go'
stderr '(link|gccgo)( |\.exe)'
# ... but the output binary can serve as a cache.
go build -o main$GOEXE -x main.go
stderr '(link|gccgo)( |\.exe)'
go build -o main$GOEXE -x main.go
! stderr '(link|gccgo)( |\.exe)'
-- main.go --
package main
func main() {}
|