]> Cypherpunks repositories - gostls13.git/commit
cmd/5l, cmd/6l, cmd/8l, cmd/cc, cmd/gc: new flag parsing
authorRuss Cox <rsc@golang.org>
Sun, 6 Jan 2013 20:24:47 +0000 (15:24 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 6 Jan 2013 20:24:47 +0000 (15:24 -0500)
commitcbbc6a102d5e7e5e2bb685a0c661d1f731c88344
treeeb7e78f00642343fc7022d19ea4cb95b7d5d6269
parentd37c572ad54921319653a4abdd749221f7779bb5
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
18 files changed:
doc/go1.1.html
include/libc.h
src/cmd/5c/peep.c
src/cmd/5l/l.h
src/cmd/5l/obj.c
src/cmd/6l/l.h
src/cmd/6l/obj.c
src/cmd/8l/l.h
src/cmd/8l/obj.c
src/cmd/cc/cc.h
src/cmd/cc/lex.c
src/cmd/cc/sub.c
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/go/build.go
src/cmd/ld/lib.c
src/cmd/ld/lib.h
src/lib9/flag.c [new file with mode: 0644]