Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/386/go/src/cmd/go/testdata/script/build_cache_link.txt

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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() {}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.