cmd/asm, cmd/cgo, cmd/compile, cmd/cover, cmd/link: use standard -V output

Also add -V=full to print a unique identifier of the specific tool being invoked.
This will be used for content-based staleness.

Also sort and clean up a few of the flag doc comments.

Change-Id: I786fe50be0b8e5f77af809d8d2dab721185c2abd
Reviewed-on: https://go-review.googlesource.com/68590
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Russ Cox 2017-10-05 15:37:13 -04:00
parent cb3b345209
commit 840f2c167f
10 changed files with 98 additions and 45 deletions

View file

@ -186,7 +186,7 @@ func Main(archInit func(*Arch)) {
objabi.Flagcount("K", "debug missing line numbers", &Debug['K'])
objabi.Flagcount("N", "disable optimizations", &Debug['N'])
flag.BoolVar(&Debug_asm, "S", false, "print assembly listing")
objabi.Flagfn0("V", "print compiler version", doversion)
objabi.AddVersionFlag() // -V
objabi.Flagcount("W", "debug parse tree after type checking", &Debug['W'])
flag.StringVar(&asmhdr, "asmhdr", "", "write assembly header to `file`")
flag.StringVar(&buildid, "buildid", "", "record `id` as the build id in the export metadata")