3 # Usage: buildall [-e] [-nocmp] [-work]
5 # Builds everything (std) for every GOOS/GOARCH combination but installs nothing.
7 # By default, runs the builds with -toolexec 'toolstash -cmp', to test that the
8 # toolchain is producing bit identical output to a previous known good toolchain.
11 # -e: stop at first failure
12 # -nocmp: turn off toolstash -cmp; just check that ordinary builds succeed
13 # -work: pass -work to go command
16 if [ "$1" = "-e" ]; then
22 if [ "$1" = "-nocmp" ]; then
28 if [ "$1" = "-work" ]; then
33 cd $(go env GOROOT)/src
34 go install cmd/compile cmd/link cmd/asm || exit 1
36 if [ "$pattern" = "" ]; then
40 targets="$(go tool dist list; echo linux/386/387)"
41 targets="$(echo "$targets" | tr '/' '-' | sort | egrep "$pattern" | egrep -v 'android-arm|darwin-arm')"
43 # put linux, nacl first in the target list to get all the architectures up front.
44 targets="$(echo "$targets" | egrep 'linux|nacl') $(echo "$targets" | egrep -v 'linux|nacl')"
46 if [ "$sete" = true ]; then
49 for target in $targets
52 export GOOS=$(echo $target | sed 's/-.*//')
53 export GOARCH=$(echo $target | sed 's/.*-//')
55 if [ "$GOARCH" = "387" ]; then
60 if [ "$GOOS" = "android" ]; then
61 go build $work -a -toolexec 'toolstash -cmp' std
63 go build $work -a -toolexec 'toolstash -cmp' std cmd