1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:44:40 -07:00
go/src/cmd
Russ Cox cbbc6a102d cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing
This CL adds a flag parser that matches the semantics of Go's
package flag. It also changes the linkers and compilers to use
the new flag parser.

Command lines that used to work, like
        8c -FVw
        6c -Dfoo
        5g -I/foo/bar
now need to be split into separate arguments:
        8c -F -V -w
        6c -D foo
        5g -I /foo/bar
The new spacing will work with both old and new tools.

The new parser also allows = for arguments, as in
        6c -D=foo
        5g -I=/foo/bar
but that syntax will not work with the old tools.

In addition to matching standard Go binary flag parsing,
the new flag parser generates more detailed usage messages
and opens the door to long flag names.

The recently added gc flag -= has been renamed -complete.

R=remyoudompheng, daniel.morsing, minux.ma, iant
CC=golang-dev
https://golang.org/cl/7035043
2013-01-06 15:24:47 -05:00
..
5a cmd/gc, cmd/ld: struct field tracking 2012-11-02 00:17:21 -04:00
5c cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
5g cmd/5g, cmd/6g, cmd/8g: flush return parameters in case of panic. 2013-01-04 17:07:21 +01:00
5l cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
6a cmd/gc, cmd/ld: struct field tracking 2012-11-02 00:17:21 -04:00
6c cmd/6c, cmd/8c: add fixjmp step to regopt. 2012-12-06 07:20:03 +01:00
6g cmd/5g, cmd/6g, cmd/8g: flush return parameters in case of panic. 2013-01-04 17:07:21 +01:00
6l cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
8a cmd/8a: support XMM registers. 2012-12-06 07:27:38 +01:00
8c cmd/6c, cmd/8c: add fixjmp step to regopt. 2012-12-06 07:20:03 +01:00
8g cmd/5g, cmd/6g, cmd/8g: flush return parameters in case of panic. 2013-01-04 17:07:21 +01:00
8l cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
addr2line runtime/pprof: support OS X CPU profiling 2012-02-28 16:18:24 -05:00
api cmd/api: speed up API check by 2x, caching parser.ParseFile calls 2012-11-19 13:50:20 -08:00
cc cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
cgo cmd/cgo: access errno from void C function 2012-12-18 00:26:08 +08:00
cov libmach, cmd/cc, cmd/cov, cmd/ld, cmd/prof: check malloc return value 2012-11-27 03:05:46 +08:00
dist cmd/dist: sse auto-detect 2013-01-04 10:59:10 -05:00
fix cmd/fix: Add keys to printer.Config composite literals. 2012-12-16 19:31:59 -05:00
gc cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
go cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
godoc cmd/godoc: ignore misnamed examples and print a warning 2013-01-02 16:00:41 +11:00
gofmt gofmt: test rewrite of (x.(type)) -> x.(type) 2012-12-06 09:20:03 -08:00
ld cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing 2013-01-06 15:24:47 -05:00
nm gofmt: apply gofmt -w src misc 2012-10-30 13:38:01 -07:00
objdump runtime/pprof: support OS X CPU profiling 2012-02-28 16:18:24 -05:00
pack cmd/pack: rename __.SYMDEF to __.GOSYMDEF 2012-09-13 10:26:21 -04:00
prof libmach, cmd/cc, cmd/cov, cmd/ld, cmd/prof: check malloc return value 2012-11-27 03:05:46 +08:00
vet cmd/vet: expand printf flags understood by %s and %q. 2012-12-21 13:48:36 +11:00
yacc cmd/yacc: fix debug print of token name 2012-12-22 16:45:35 -05:00