diff options
author | Ayke van Laethem <[email protected]> | 2021-07-13 16:59:43 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-07-31 18:33:52 +0200 |
commit | 7434e5a2c7110e512baa93d747ce47d5b4798446 (patch) | |
tree | d71ba2361273a9c597e57d51a1ea1aa4e587030f /main.go | |
parent | 65c1978965bc2f00d07765978f977617ba40b28f (diff) | |
download | tinygo-7434e5a2c7110e512baa93d747ce47d5b4798446.tar.gz tinygo-7434e5a2c7110e512baa93d747ce47d5b4798446.zip |
main: strip debug information at link time instead of at compile time
Stripping debug information at link time also allows relocation
compression (aka linker relaxations). Keeping debug information at
compile time and optionally stripping it at link time has some
advantages:
* Automatic stack sizes on Cortex-M rely on the presence of debug
information.
* Some parts of the compiler now rely on the presence of debug
information for proper diagnostics.
* It works better with the cache: there is no distinction between
debug and no-debug builds.
* It makes it easier (or possible at all) to enable debug information
in the wasi-libc library without big downsides.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1019,7 +1019,7 @@ func main() { printStacks := flag.Bool("print-stacks", false, "print stack sizes of goroutines") printAllocsString := flag.String("print-allocs", "", "regular expression of functions for which heap allocations should be printed") printCommands := flag.Bool("x", false, "Print commands") - nodebug := flag.Bool("no-debug", false, "disable DWARF debug symbol generation") + nodebug := flag.Bool("no-debug", false, "strip debug information") ocdCommandsString := flag.String("ocd-commands", "", "OpenOCD commands, overriding target spec (can specify multiple separated by commas)") ocdOutput := flag.Bool("ocd-output", false, "print OCD daemon output during debug") port := flag.String("port", "", "flash port (can specify multiple candidates separated by commas)") |