Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld-link will include debug info sections in the linked binary if you pass -debug (and you probably also want to pass -nopdb to prevent PDB emission if you're using DWARF). Perhaps you should make the MinGW driver pass those two options by default and then not pass them if -s is passed to it?
I think it does if your object file contains .debug_ sections, as Shoaib pointed out.
Assuming we're still committed to the translation layer approach, it sounds like we will need a /debug:dwarf flag or something similar to enable this behavior in a more sensible way. /debug /nopdb is a surprising spelling for "I want DWARF in my image".
Output debug info by default.
Not sure whether it actually works though, because the gdb version I have (which is a tad old admittedly) refuses to load the lld produced exe, saying "not in executable format: File format not recognized". Although maybe the dwarf debug info does work with some other tools?
LGTM
MinGW/Options.td | ||
---|---|---|
27 ↗ | (On Diff #121381) | I think you want to use F instead of Flags because both -strip-all and --strip-all are valid. |