[PATCH] D131157: [llvm-dwarfutil] Remove redundant dependency.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 15:09:22 PDT 2022
avl added inline comments.
================
Comment at: llvm/tools/llvm-dwarfutil/CMakeLists.txt:6
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
DebugInfoDWARF
----------------
thakis wrote:
> Given that you call InitializeAllTargets(), shouldn't you keep this one and instead remove the 3 AllTargetsFoo at the bottom instead?
>
> (`InitializeAllTargets` calls `LLVMInitialize.*Target\b` and that's in `llvm/lib/Target/Foo/FooTargetMachine.cpp`)
${LLVM_TARGETS_TO_BUILD} includes wider set of dependencies.
If tool does not need f.e. disassembler then we can remove corresponding dependency.
In this concrete case FooDisassembler, FooAsmParser are not neccessary.
If 3 AllTargetsFoo would be removed and ${LLVM_TARGETS_TO_BUILD} will be left then dependency on AllTargetsDisassemblers and others would be added.
================
Comment at: llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp:484
InitializeAllAsmPrinters();
- InitializeAllAsmParsers();
----------------
thakis wrote:
> It's not obvious to me why this call is redundant, can you elaborate?
AsmParser functionality is not used by this tool. Thus we do not need to initialize them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131157/new/
https://reviews.llvm.org/D131157
More information about the llvm-commits
mailing list