[llvm] r249632 - Stop linking all target libraries in llvm-nm and llvm-objdump.
Pete Cooper via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 15:39:18 PDT 2015
Author: pete
Date: Wed Oct 7 17:39:17 2015
New Revision: 249632
URL: http://llvm.org/viewvc/llvm-project?rev=249632&view=rev
Log:
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.
Modified:
llvm/trunk/tools/llvm-nm/CMakeLists.txt
llvm/trunk/tools/llvm-objdump/CMakeLists.txt
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-nm/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/CMakeLists.txt?rev=249632&r1=249631&r2=249632&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-nm/CMakeLists.txt Wed Oct 7 17:39:17 2015
@@ -1,5 +1,7 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
+ AllTargetsAsmParsers
+ AllTargetsDescs
+ AllTargetsInfos
Core
Object
Support
Modified: llvm/trunk/tools/llvm-objdump/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/CMakeLists.txt?rev=249632&r1=249631&r2=249632&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-objdump/CMakeLists.txt Wed Oct 7 17:39:17 2015
@@ -1,5 +1,8 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
+ AllTargetsAsmPrinters
+ AllTargetsDescs
+ AllTargetsDisassemblers
+ AllTargetsInfos
CodeGen
DebugInfoDWARF
MC
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=249632&r1=249631&r2=249632&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Wed Oct 7 17:39:17 2015
@@ -1582,7 +1582,6 @@ int main(int argc, char **argv) {
// Initialize targets and assembly printers/parsers.
llvm::InitializeAllTargetInfos();
llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
llvm::InitializeAllDisassemblers();
// Register the target printer for --version.
More information about the llvm-commits
mailing list