]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: print usage to stderr for consistency
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 24 Dec 2017 16:50:28 +0000 (16:50 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 13 Feb 2018 21:11:55 +0000 (21:11 +0000)
commit7ddd467ef335f9ea2347bb9c2628091568b3370f
treeb36bd5895a7bfe97e782db0267e863c6963ebb9c
parentddb503be96dd9a10c6591a2e6806548f9ddbac62
cmd/compile: print usage to stderr for consistency

All the other tools and commands print the usage text to standard error.
"go tool compile" was the odd one out, so fix it.

While at it, make objabi.Flagprint a bit more Go-like with an io.Writer
instead of a file descriptor, which is likely a leftover from the C
days.

Fixes #23234.

Change-Id: I9abf2e79461e61c8c8bfaee2c6bf8faf26e0e6c3
Reviewed-on: https://go-review.googlesource.com/85418
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/main.go
src/cmd/internal/objabi/flag.go
src/cmd/link/internal/ld/lib.go