Akshay Bharambe
Akshay Bharambe
~1 min read

Tags

Go provides a linker flag to eliminate debug information and DWARF tables while building executables.

Have a look at this minimal web server and observe the build size. The build size reduces to 4.4M from 6.2M. This blog explains it in detail.

This does not affect the stack trace.

PS: I know binary size does not matter these days, but this information is worth knowing.

Driver code - IMAGE

Result - IMAGE