rnk added a comment.

There's another use case worth considering here, which is -fmodules-debuginfo. 
In that situation, a standalone object file is emitted that contains nothing 
but DWARF .debug_info sections, and the object is fed to the linker. If the 
linker drops it with --gc-sections, it's not going to work. Here's a transcript 
of me trying to use this feature:
https://reviews.llvm.org/P8150

Note that t.o (the normal object) only contains a forward declaration of Foo, 
and the complete definition is provided in the debug-info-only module object 
file, t2.o in this case.

I think, before this change, passing an object with only .debug_info in it (and 
--gc-sections) used to retain that debug info. I think we need a way to keep 
doing that going forward. I think that might mean we need a new flag for this 
new behavior, or we should revert this patch altogether, and recommend that 
people who want smaller debug info use tools like dsymutil, dwz, DWP, or other 
format aware things that can remove unreferenced or duplicate DWARF.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54747/new/

https://reviews.llvm.org/D54747



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to