This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Remove unnecessary lld dependency on DebugInfo/Symbolize.
ClosedPublic

Authored by noajshu on Dec 10 2021, 2:30 PM.

Details

Summary

The gn script for lld's COFF lib adds an unnecessary dependency on llvm/lib/DebugInfo/Symbolize. There is no such dependency in lld/COFF/CMakeLists.txt. This can be safely removed.

Diff Detail

Event Timeline

noajshu requested review of this revision.Dec 10 2021, 2:30 PM
noajshu created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2021, 2:30 PM
phosek accepted this revision.Dec 10 2021, 3:09 PM

LGTM

This revision is now accepted and ready to land.Dec 10 2021, 3:09 PM
noajshu updated this revision to Diff 393603.Dec 10 2021, 3:24 PM

Replace include of Symbolize.h with DIContext.h in lld/COFF/SymbolTable.cpp. LLD just needs llvm/DebugInfo/DIContext.h which it currently gets through
Symbolize.h -> SymbolizableModule.h -> DIContext.h.
This needlessly pulls in extra headers (and perhaps led to the gn dep line fixed in this diff, although I'm not familiar with how the gn build is maintained.).

Thanks for the review @phosek . Just to avoid any possible confusion I've also corrected SymbolTable.cpp to include "DIContext.h" instead of "Symbolize.h". Does this still LGTY?

noajshu retitled this revision from [gn build] Remove unnecessary lld dependency on DebugInfo/Symbolize dependency. to [gn build] Remove unnecessary lld dependency on DebugInfo/Symbolize..Dec 10 2021, 3:36 PM
noajshu edited the summary of this revision. (Show Details)

Thanks for the review @phosek . Just to avoid any possible confusion I've also corrected SymbolTable.cpp to include "DIContext.h" instead of "Symbolize.h". Does this still LGTY?

Can we do that in a separate change?

thakis accepted this revision.Dec 13 2021, 8:12 AM

This change lg, looks like https://reviews.llvm.org/D69198 removed this dep.

noajshu edited the summary of this revision. (Show Details)Dec 13 2021, 10:29 AM
noajshu updated this revision to Diff 393988.Dec 13 2021, 11:56 AM

Removed change of Symbolize header include.

noajshu edited the summary of this revision. (Show Details)Dec 13 2021, 11:58 AM

Thanks for the review @phosek . Just to avoid any possible confusion I've also corrected SymbolTable.cpp to include "DIContext.h" instead of "Symbolize.h". Does this still LGTY?

Can we do that in a separate change?

Sure! I've moved that change into D115659.

This revision was landed with ongoing or failed builds.Dec 13 2021, 12:07 PM
This revision was automatically updated to reflect the committed changes.