Page MenuHomePhabricator

Add LLVM_EXTERNALIZE_DEBUGINFO_FLATTEN, which can do flat dSYM
AcceptedPublic

Authored by directhex on Oct 13 2021, 10:14 AM.

Details

Reviewers
JDevlieghere
Summary

As standard, dsymutil creates a directory structure for symbols - for example, llc goes to llc.dSYM/Contents/Resources/DWARF/llc.

dsymutil also accepts a -f/--flat parameter, which emits a single file without the extra directory baggage, e.g. llc to llc.dwarf.

Add a CMake option to enable this mode

Diff Detail

Event Timeline

directhex created this revision.Oct 13 2021, 10:14 AM
directhex requested review of this revision.Oct 13 2021, 10:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2021, 10:14 AM

What's the motivation for this?

Our debug symbol infra works pretty much entirely on a single file model (i.e. it started life with .pdb Windows files, and was extended to handle symbols for macOS and Linux) so we use flat mode throughout our build system, in order for our symbol downloader (dotnet symbol) to work post-hoc. This change struck me as generally useful & worth submitting upstream, rather than carrying forever downstream.

JDevlieghere accepted this revision.Oct 28 2021, 4:31 PM

Alright, sounds reasonable. LGTM.

This revision is now accepted and ready to land.Oct 28 2021, 4:31 PM