summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-07-03 19:40:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-07-03 19:40:08 +0000
commit8e8debc75671a19b8df0e2e95b6a659ea6419830 (patch)
tree0ce5ed8b6d2479f70de390e883f47cbfb04af56b /llvm/tools/llvm-ar/llvm-ar.cpp
parent0ed2e2f6ecd87e703334ae481972e9def125deae (diff)
downloadbcm5719-llvm-8e8debc75671a19b8df0e2e95b6a659ea6419830.tar.gz
bcm5719-llvm-8e8debc75671a19b8df0e2e95b6a659ea6419830.zip
Add support for inline asm symbols in llvm-ar.
This should allow llvm-ar to be used instead of gnu ar + plugin in a LTO build. I will add a release note about it once I finish a LTO bootstrap with it. llvm-svn: 212287
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index 60886bb7b11..4bd586be451 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -24,6 +24,7 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
+#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
@@ -903,6 +904,10 @@ int main(int argc, char **argv) {
" 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(argv);
OpenPOWER on IntegriCloud