diff options
author | yo-tak <yo.tak0812@gmail.com> | 2019-01-23 00:11:33 +0900 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2019-01-25 04:57:20 +0000 |
commit | 8b7cf898af3ab21c9e07e5b24d59c16b9fcf295a (patch) | |
tree | b29d2aeee9345cd25ae1bafafae7b62453b144f8 /src/cmd/compile/doc.go | |
parent | 9d23975d89e6cc3df4f2156b2ae0df5d2cef16fb (diff) | |
download | go-8b7cf898af3ab21c9e07e5b24d59c16b9fcf295a.tar.gz go-8b7cf898af3ab21c9e07e5b24d59c16b9fcf295a.zip |
cmd/compile, cmd/link: document more flags
Fixes #26533
Change-Id: I5a48d667d474f3f222f9055e51131561a0cf45b6
Reviewed-on: https://go-review.googlesource.com/c/138757
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/compile/doc.go')
-rw-r--r-- | src/cmd/compile/doc.go | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/src/cmd/compile/doc.go b/src/cmd/compile/doc.go index e2a19d98c0..5291a8b0eb 100644 --- a/src/cmd/compile/doc.go +++ b/src/cmd/compile/doc.go @@ -44,8 +44,12 @@ Flags: Print compiler version and exit. -asmhdr file Write assembly header to file. + -buildid id + Record id as the build id in the export metadata. -blockprofile file Write block profile for the compilation to file. + -c int + Concurrency during compilation. Set 1 for no concurrency (default is 1). -complete Assume package has no non-Go components. -cpuprofile file @@ -54,8 +58,14 @@ Flags: Allow references to Go symbols in shared libraries (experimental). -e Remove the limit on the number of errors reported (default limit is 10). + -goversion string + Specify required go tool version of the runtime. + Exits when the runtime go version does not match goversion. -h Halt with a stack trace at the first error detected. + -importcfg file + Read import configuration from file. + In the file, set importmap, packagefile to specify import resolution. -importmap old=new Interpret import "old" as import "new" during compilation. The option may be repeated to add multiple mappings. @@ -74,6 +84,8 @@ Flags: object to usual output file (as specified by -o). Without this flag, the -o output is a combination of both linker and compiler input. + -m + Print optimization decisions. -memprofile file Write memory profile for the compilation to file. -memprofilerate rate @@ -93,11 +105,50 @@ Flags: Write a package (archive) file rather than an object file -race Compile with race detector enabled. + -s + Warn about composite literals that can be simplified. + -shared + Generate code that can be linked into a shared library. + -traceprofile file + Write an execution trace to file. -trimpath prefix Remove prefix from recorded source file paths. -There are also a number of debugging flags; run the command with no arguments -for a usage message. +Flags related to debugging information: + + -dwarf + Generate DWARF symbols. + -dwarflocationlists + Add location lists to DWARF in optimized mode. + -gendwarfinl int + Generate DWARF inline info records (default 2). + +Flags to debug the compiler itself: + + -E + Debug symbol export. + -K + Debug missing line numbers. + -d list + Print debug information about items in list. Try -d help for further information. + -live + Debug liveness analysis. + -v + Increase debug verbosity. + -% + Debug non-static initializers. + -W + Debug parse tree after type checking. + -f + Debug stack frames. + -i + Debug line number stack. + -j + Debug runtime-initialized variables. + -r + Debug generated wrappers. + -w + Debug type checking. Compiler Directives |