[llvm] [CMake] Turn on LLVM_USE_SPLIT_DWARF by default for Linux Debug build (PR #80328)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 15:05:30 PST 2024


MaskRay wrote:

> GCC and LLVM have now DWARF5 on by default. It has it's own accelerator tables .debug_names. It looks like side affect of this is that we will also be generating --gdb-index in the linker. I don't think this is the behavior we want with DWARF5.

I respectfully disagree with changing the default due to the diverse configurations and their inherent trade-offs. `-gsplit-dwarf` deviates from common practices of other project build systems (this is an advanced option), and the `.gdb_index` section doesn't benefit lldb users.

I acknowledge that people's opinions differ and some prefer making convenience changes to specific configurations.

Perhaps we should not do too smart things here like making gdb-index `LLVM_USE_SPLIT_DWARF` the default and add 
a `.debug_names` configuration when linker `--debug-names` work is complete. These advanced options can be learned by users.

https://github.com/llvm/llvm-project/pull/80328


More information about the llvm-commits mailing list