Commit a1110c39 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

cmd/go: don't fail on invalid GOOS/GOARCH pair when using gccgo

Fixes #12272

Change-Id: I0306ce0ef4a87df2158df3b7d4d8d93a1cb6dabc
Reviewed-on: https://go-review.googlesource.com/24864Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
parent b30814bb
...@@ -673,11 +673,6 @@ func init() { ...@@ -673,11 +673,6 @@ func init() {
goarch = buildContext.GOARCH goarch = buildContext.GOARCH
goos = buildContext.GOOS goos = buildContext.GOOS
if _, ok := osArchSupportsCgo[goos+"/"+goarch]; !ok {
fmt.Fprintf(os.Stderr, "cmd/go: unsupported GOOS/GOARCH pair %s/%s\n", goos, goarch)
os.Exit(2)
}
if goos == "windows" { if goos == "windows" {
exeSuffix = ".exe" exeSuffix = ".exe"
} }
...@@ -1226,6 +1221,11 @@ func allArchiveActions(root *action) []*action { ...@@ -1226,6 +1221,11 @@ func allArchiveActions(root *action) []*action {
// do runs the action graph rooted at root. // do runs the action graph rooted at root.
func (b *builder) do(root *action) { func (b *builder) do(root *action) {
if _, ok := osArchSupportsCgo[goos+"/"+goarch]; !ok && buildContext.Compiler == "gc" {
fmt.Fprintf(os.Stderr, "cmd/go: unsupported GOOS/GOARCH pair %s/%s\n", goos, goarch)
os.Exit(2)
}
// Build list of all actions, assigning depth-first post-order priority. // Build list of all actions, assigning depth-first post-order priority.
// The original implementation here was a true queue // The original implementation here was a true queue
// (using a channel) but it had the effect of getting // (using a channel) but it had the effect of getting
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment