This is an archive of the discontinued LLVM Phabricator instance.

[lld/COFF] Add /dwodir to enable DWARF fission with LTO
ClosedPublic

Authored by HaohaiWen on Jun 29 2023, 5:20 AM.

Details

Summary

This patch added /dwodir to lld/COFF which is equivalent to lld/ELF
option -plugin-opt=dwo_dir=. This option tells LTO backend to create
dwo directory and files and all dwo files will be in it. Otherwise all
dwarf sections will be embeded into image even if -gsplit-dwarf is
specified when using LTO.

Diff Detail

Event Timeline

HaohaiWen created this revision.Jun 29 2023, 5:20 AM
HaohaiWen requested review of this revision.Jun 29 2023, 5:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 5:20 AM

Normally clang and lld patches are separate. You can git log -- lld/COFF to find who usually reviews lld/COFF code and add these folks as reviewers.
Not many people set subscription rules but some may appreciate if you let know that there is such a change.
Though, I have reviewed some lld/COFF patches and am happy to stamp this change.

MaskRay accepted this revision.Jun 29 2023, 2:17 PM
MaskRay added a subscriber: mstorsjo.

I'll be away for a few days and back on July 5. Clicked "Accept" if you keep just the lld/COFF part for this patch and create another patch for clang/lib/Driver.

I guess @mstorsjo may have some opinions.

This revision is now accepted and ready to land.Jun 29 2023, 2:17 PM
HaohaiWen updated this revision to Diff 536084.Jun 29 2023, 6:27 PM

Remove driver changes

Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 6:27 PM
HaohaiWen retitled this revision from [Driver][lld/COFF] Support DWARF fission when using LTO on Windows to [lld/COFF] Add /dwodir to enable DWARF fission with LTO.Jun 29 2023, 6:29 PM
HaohaiWen edited the summary of this revision. (Show Details)
HaohaiWen added a comment.EditedJun 29 2023, 7:56 PM

I'll be away for a few days and back on July 5. Clicked "Accept" if you keep just the lld/COFF part for this patch and create another patch for clang/lib/Driver.

I guess @mstorsjo may have some opinions.

Thank you.

Patch has been split to:
D154176

No objection from me here, this seems straightforward. We should probably add a corresponding option in the lld mingw frontend too (as a separate patch later).

This revision was automatically updated to reflect the committed changes.