nats-server
nats-server copied to clipboard
Remove flag that strips dwarf symbols
Dwarf symbols are used by debugging tools to get the layout of the data structure, and many other runtime information. For example gdb needs the calling convention information to figure out how to invoke a function.
The increase in executable size is high though, current size of the dwarf symbols built from the mainline is ~3MB.
Or the executable file built with go build is ~15MB, and go build -ldflags "-w" is ~12MB.
Let me know if this is acceptable.
@yzhao1012 As you know we already not stripping symbols anymore (since you are the one that submitted PR earlier). I don't think having the dwarf symbols in a release product is necessary. It is unlikely that one will do a "gdb" session on a live production server. The product is open-sourced and anyone can build it the way they want. If some users have the need to debug the server, they can build a version without the "-w" flag.