Stop linking all target libraries in llvm-nm and llvm-objdump.

llvm-nm only needs the target to parse module level assembly in bitcode.  It doesn't need a disassembler or codegen.

llvm-objdump needs to be able to disassemble a file, but doesn't need asm parsers or codegen.

This reduces the sizes of these tools by a few MB each, depending on how many backends are linked in.

llvm-svn: 249632
This commit is contained in:
Pete Cooper 2015-10-07 22:39:17 +00:00
parent 69d25a8d7b
commit e11c9de83d
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,7 @@
set(LLVM_LINK_COMPONENTS set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD} AllTargetsAsmParsers
AllTargetsDescs
AllTargetsInfos
Core Core
Object Object
Support Support

View File

@ -1,5 +1,8 @@
set(LLVM_LINK_COMPONENTS set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD} AllTargetsAsmPrinters
AllTargetsDescs
AllTargetsDisassemblers
AllTargetsInfos
CodeGen CodeGen
DebugInfoDWARF DebugInfoDWARF
MC MC

View File

@ -1582,7 +1582,6 @@ int main(int argc, char **argv) {
// Initialize targets and assembly printers/parsers. // Initialize targets and assembly printers/parsers.
llvm::InitializeAllTargetInfos(); llvm::InitializeAllTargetInfos();
llvm::InitializeAllTargetMCs(); llvm::InitializeAllTargetMCs();
llvm::InitializeAllAsmParsers();
llvm::InitializeAllDisassemblers(); llvm::InitializeAllDisassemblers();
// Register the target printer for --version. // Register the target printer for --version.