Commit 8a072ada authored by Didier Spezia's avatar Didier Spezia Committed by Rob Pike

cmd/internal/gc,ld: use new flag argument syntax

The usage messages for the flags in gc and ld are using the old
flag argument syntax:
   "arg: description using arg"

Update them to the Go 1.5 flag package's syntax:
   "description using arg"

Fixes #10505

Change-Id: Ifa54ff91e1fd644cfc9a3b41e10176eac3654137
Reviewed-on: https://go-review.googlesource.com/9505Reviewed-by: 's avatarRob Pike <r@golang.org>
parent dc870d5f
......@@ -184,9 +184,9 @@ func Main() {
obj.Flagcount("%", "debug non-static initializers", &Debug['%'])
obj.Flagcount("A", "for bootstrapping, allow 'any' type", &Debug['A'])
obj.Flagcount("B", "disable bounds checking", &Debug['B'])
obj.Flagstr("D", "path: set relative path for local imports", &localimport)
obj.Flagstr("D", "set relative path for local imports", &localimport)
obj.Flagcount("E", "debug symbol export", &Debug['E'])
obj.Flagfn1("I", "dir: add dir to import search path", addidir)
obj.Flagfn1("I", "add specified directory to import search path", addidir)
obj.Flagcount("K", "debug missing line numbers", &Debug['K'])
obj.Flagcount("L", "use full (long) path in error messages", &Debug['L'])
obj.Flagcount("M", "debug move generation", &Debug['M'])
......@@ -196,9 +196,9 @@ func Main() {
obj.Flagcount("S", "print assembly listing", &Debug['S'])
obj.Flagfn0("V", "print compiler version", doversion)
obj.Flagcount("W", "debug parse tree after type checking", &Debug['W'])
obj.Flagstr("asmhdr", "file: write assembly header to named file", &asmhdr)
obj.Flagstr("asmhdr", "write assembly header to named file", &asmhdr)
obj.Flagcount("complete", "compiling complete package (no C or assembly)", &pure_go)
obj.Flagstr("d", "list: print debug information about items in list", &debugstr)
obj.Flagstr("d", "print debug information about items in specified list", &debugstr)
obj.Flagcount("e", "no limit on number of errors reported", &Debug['e'])
obj.Flagcount("f", "debug stack frames", &Debug['f'])
obj.Flagcount("g", "debug code generation", &Debug['g'])
......@@ -210,13 +210,13 @@ func Main() {
obj.Flagcount("live", "debug liveness analysis", &debuglive)
obj.Flagcount("m", "print optimization decisions", &Debug['m'])
obj.Flagcount("nolocalimports", "reject local (relative) imports", &nolocalimports)
obj.Flagstr("o", "obj: set output file", &outfile)
obj.Flagstr("p", "path: set expected package import path", &myimportpath)
obj.Flagstr("o", "set output file", &outfile)
obj.Flagstr("p", "set expected package import path", &myimportpath)
obj.Flagcount("pack", "write package file instead of object file", &writearchive)
obj.Flagcount("r", "debug generated wrappers", &Debug['r'])
obj.Flagcount("race", "enable race detector", &flag_race)
obj.Flagcount("s", "warn about composite literals that can be simplified", &Debug['s'])
obj.Flagstr("trimpath", "prefix: remove prefix from recorded source file paths", &Ctxt.LineHist.TrimPathPrefix)
obj.Flagstr("trimpath", "remove specified prefix from recorded source file paths", &Ctxt.LineHist.TrimPathPrefix)
obj.Flagcount("u", "reject unsafe code", &safemode)
obj.Flagcount("v", "increase debug verbosity", &Debug['v'])
obj.Flagcount("w", "debug type checking", &Debug['w'])
......@@ -231,8 +231,8 @@ func Main() {
obj.Flagcount("shared", "generate code that can be linked into a shared library", &flag_shared)
flag.BoolVar(&flag_dynlink, "dynlink", false, "support references to Go symbols defined in other shared libraries")
}
obj.Flagstr("cpuprofile", "file: write cpu profile to file", &cpuprofile)
obj.Flagstr("memprofile", "file: write memory profile to file", &memprofile)
obj.Flagstr("cpuprofile", "write cpu profile to file", &cpuprofile)
obj.Flagstr("memprofile", "write memory profile to file", &memprofile)
obj.Flagint64("memprofilerate", "set runtime.MemProfileRate", &memprofilerate)
obj.Flagparse(usage)
......
......@@ -77,16 +77,16 @@ func Ldmain() {
if Thearch.Thechar == '6' {
obj.Flagcount("8", "assume 64-bit addresses", &Debug['8'])
}
obj.Flagfn1("B", "info: define ELF NT_GNU_BUILD_ID note", addbuildinfo)
obj.Flagfn1("B", "add an ELF NT_GNU_BUILD_ID note when using ELF", addbuildinfo)
obj.Flagcount("C", "check Go calls to C code", &Debug['C'])
obj.Flagint64("D", "addr: data address", &INITDAT)
obj.Flagstr("E", "sym: entry symbol", &INITENTRY)
obj.Flagint64("D", "set data segment address", &INITDAT)
obj.Flagstr("E", "set entry symbol name", &INITENTRY)
if Thearch.Thechar == '5' {
obj.Flagcount("G", "debug pseudo-ops", &Debug['G'])
}
obj.Flagfn1("I", "interp: set ELF interp", setinterp)
obj.Flagfn1("L", "dir: add dir to library path", Lflag)
obj.Flagfn1("H", "head: header type", setheadtype)
obj.Flagfn1("I", "specify which ELF dynamic linker to use", setinterp)
obj.Flagfn1("L", "add specified directory to library path", Lflag)
obj.Flagfn1("H", "set header type to specified value", setheadtype)
obj.Flagcount("K", "add stack underflow checks", &Debug['K'])
if Thearch.Thechar == '5' {
obj.Flagcount("M", "disable software div/mod", &Debug['M'])
......@@ -96,35 +96,35 @@ func Ldmain() {
if Thearch.Thechar == '5' {
obj.Flagcount("P", "debug code generation", &Debug['P'])
}
obj.Flagint32("R", "rnd: address rounding", &INITRND)
obj.Flagint32("R", "set address rounding value", &INITRND)
obj.Flagcount("nil", "check type signatures", &Debug['S'])
obj.Flagint64("T", "addr: text address", &INITTEXT)
obj.Flagint64("T", "set text segment address", &INITTEXT)
obj.Flagfn0("V", "print version and exit", doversion)
obj.Flagcount("W", "disassemble input", &Debug['W'])
obj.Flagfn1("X", "name value: define string data", addstrdata1)
obj.Flagfn1("X", "set the value of a string variable; the next two arguments are its name and value", addstrdata1)
obj.Flagcount("Z", "clear stack frame on entry", &Debug['Z'])
obj.Flagcount("a", "disassemble output", &Debug['a'])
flag.Var(&Buildmode, "buildmode", "build mode to use")
obj.Flagcount("c", "dump call graph", &Debug['c'])
obj.Flagcount("d", "disable dynamic executable", &Debug['d'])
obj.Flagstr("extld", "ld: linker to run in external mode", &extld)
obj.Flagstr("extldflags", "ldflags: flags for external linker", &extldflags)
obj.Flagstr("extld", "set name of linker to run in external mode", &extld)
obj.Flagstr("extldflags", "set linker flags for external linker", &extldflags)
obj.Flagcount("f", "ignore version mismatch", &Debug['f'])
obj.Flagcount("g", "disable go package data checks", &Debug['g'])
obj.Flagstr("installsuffix", "suffix: pkg directory suffix", &flag_installsuffix)
obj.Flagstr("k", "sym: set field tracking symbol", &tracksym)
obj.Flagfn1("linkmode", "mode: set link mode (internal, external, auto)", setlinkmode)
obj.Flagstr("installsuffix", "set package directory suffix", &flag_installsuffix)
obj.Flagstr("k", "set field tracking symbol", &tracksym)
obj.Flagfn1("linkmode", "set link mode (internal, external, auto)", setlinkmode)
flag.BoolVar(&Linkshared, "linkshared", false, "link against installed Go shared libraries")
obj.Flagcount("n", "dump symbol table", &Debug['n'])
obj.Flagstr("o", "outfile: set output file", &outfile)
flag.Var(&rpath, "r", "dir1:dir2:...: set ELF dynamic linker search path")
obj.Flagstr("o", "set output file", &outfile)
flag.Var(&rpath, "r", "set the ELF dynamic linker search path to dir1:dir2:...")
obj.Flagcount("race", "enable race detector", &flag_race)
obj.Flagcount("s", "disable symbol table", &Debug['s'])
var flagShared int
if Thearch.Thechar == '5' || Thearch.Thechar == '6' {
obj.Flagcount("shared", "generate shared object (implies -linkmode external)", &flagShared)
}
obj.Flagstr("tmpdir", "dir: leave temporary files in this directory", &tmpdir)
obj.Flagstr("tmpdir", "use specified directory for temporary files", &tmpdir)
obj.Flagcount("u", "reject unsafe packages", &Debug['u'])
obj.Flagcount("v", "print link trace", &Debug['v'])
obj.Flagcount("w", "disable DWARF generation", &Debug['w'])
......@@ -140,8 +140,8 @@ func Ldmain() {
i++
}
}
obj.Flagstr("cpuprofile", "file: write cpu profile to file", &cpuprofile)
obj.Flagstr("memprofile", "file: write memory profile to file", &memprofile)
obj.Flagstr("cpuprofile", "write cpu profile to file", &cpuprofile)
obj.Flagstr("memprofile", "write memory profile to file", &memprofile)
obj.Flagint64("memprofilerate", "set runtime.MemProfileRate", &memprofilerate)
obj.Flagparse(usage)
startProfile()
......
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