[PATCH] D133092: [clang] fix generation of .debug_aranges with LTO
Orlando Cazalet-Hyams via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 1 06:39:07 PDT 2022
Orlando added subscribers: probinson, Orlando.
Orlando added a comment.
When constructing the compiler command line (here in Clang.cpp <https://github.com/llvm/llvm-project/blob/0e5fe1cdacdca65edc84c89cc7a6de27f406de61/clang/lib/Driver/ToolChains/Clang.cpp#L4381>) there's a special case for SCE debugger tuning:
// -gdwarf-aranges turns on the emission of the aranges section in the
// backend.
// Always enabled for SCE tuning.
bool NeedAranges = DebuggerTuning == llvm::DebuggerKind::SCE;
This isn't an area I've looked at before but It looks like we (Sony - cc @probinson), at least historically, have DWARF consumers that want to see `.debug_aranges`. Given there's this bit of code for the compiler command, IMO it would be reasonable to add the special case for the linker command too. Please could you add that?
I mentioned on the discourse thread <https://discourse.llvm.org/t/clang-does-not-produce-full-debug-aranges-section-with-thinlto/64898/3> but will repeat here for other reviewers: This approach SGTM but I would feel more comfortable if someone with more experience reviewed this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133092/new/
https://reviews.llvm.org/D133092
More information about the cfe-commits
mailing list