Closed
Description
Summary
It is critical that we update the Makefile to include a way to build a binary that is debuggable. The only binary that our Makefile can generate is one that has been optimized to strip debug symbols and introduce inlining. This will be an issue if we need to debug a running binary.
Problem Definition
In order to debug a running binary the developer will need the debug symbols and to have no optimization. This type of binary is not ideal for production, but is required if we want to attach to a remote process.
Proposal
- Introduce a new target in the Makefile
build-debug
. - Remove stripping on the linker by removing both the
-s
and-w
flags from ldflags, but only forbuild-debug
. - Disable optimizations and inling by introducing a set of go compiler flags
-gcflags "all=-N -l"
tobuild-debug
. - Remove trimming by remove
-trimpath
from the ldflags forbuild-debug
.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity