Open
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go version go1.9 linux/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
$ GOARCH=386 go build -v -compiler gccgo ./mypkg/
go build: when using gccgo toolchain, please pass compiler flags using -gccgoflags, not -gcflags
mypkg
# mypkg
version.go:7:9: error: import file ‘strconv’ not found
"strconv"
$ GOARCH=xxx go build -v -compiler gccgo ./mypkg/
go build: when using gccgo toolchain, please pass compiler flags using -gccgoflags, not -gcflags
mypkg
$ echo $?
0
What did you expect to see?
Failure when the provided GOARCH
is invalid.
What did you see instead?
It builds for the default GOARCH
.
If a valid architecture is provided it tries to build that one, failing if the standard library is not built for it. If a bogus one is provided, no errors are returned and the default one is picked instead.