summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp
diff options
context:
space:
mode:
authorGreg Fitzgerald <garious@gmail.com>2015-01-23 18:52:44 +0000
committerGreg Fitzgerald <garious@gmail.com>2015-01-23 18:52:44 +0000
commit0823ea636ed82153c726acf557796ed9cea42040 (patch)
tree44a56e83b1122d2d24dafe2809895085d7f4bce3 /lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp
parent69fe98da1402e12d68379ca2d7415dbfd9fb2b0e (diff)
downloadbcm5719-llvm-0823ea636ed82153c726acf557796ed9cea42040.tar.gz
bcm5719-llvm-0823ea636ed82153c726acf557796ed9cea42040.zip
Fix the ELF shared library build targets
lldELF is used by each ELF backend. lldELF's ELFLinkingContext also held a reference to each backend, creating a link-time cycle. This patch moves the backend references to lldDriver. Differential Revision: http://reviews.llvm.org/D7119 llvm-svn: 226922
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp')
-rw-r--r--lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp b/lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp
index 6158780a1cb..eee7bf67afd 100644
--- a/lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp
+++ b/lld/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp
@@ -8,9 +8,13 @@
//===----------------------------------------------------------------------===//
#include "X86LinkingContext.h"
+#include "X86TargetHandler.h"
#include "lld/Core/LLVM.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorOr.h"
using namespace lld;
+elf::X86LinkingContext::X86LinkingContext(llvm::Triple triple)
+ : ELFLinkingContext(triple, std::unique_ptr<TargetHandlerBase>(
+ new X86TargetHandler(*this))) {}
OpenPOWER on IntegriCloud