[PATCH] llvm-ar shouldn't need targets
Chris Bieneman
beanz at apple.com
Wed Apr 29 17:08:09 PDT 2015
Hi rafael, chandlerc,
There isn't any code in llvm-ar that actually uses targets, but it links them because it calls a few InitializeAll* functions. If we remove those calls, we can remove the dependency on the targets, which makes building llvm-ar a lot faster.
http://reviews.llvm.org/D9359
Files:
tools/llvm-ar/CMakeLists.txt
tools/llvm-ar/llvm-ar.cpp
Index: tools/llvm-ar/CMakeLists.txt
===================================================================
--- tools/llvm-ar/CMakeLists.txt
+++ tools/llvm-ar/CMakeLists.txt
@@ -1,5 +1,4 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
Core
Object
Support
Index: tools/llvm-ar/llvm-ar.cpp
===================================================================
--- tools/llvm-ar/llvm-ar.cpp
+++ tools/llvm-ar/llvm-ar.cpp
@@ -1043,10 +1043,6 @@
" This program archives bitcode files into single libraries\n"
);
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
-
StringRef Stem = sys::path::stem(ToolName);
if (Stem.find("ar") != StringRef::npos)
return ar_main();
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9359.24671.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150430/da0199cc/attachment.bin>
More information about the llvm-commits
mailing list