summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
diff options
context:
space:
mode:
authorJean-Daniel Dupas <devlists@shadowlab.org>2014-12-18 21:33:38 +0000
committerJean-Daniel Dupas <devlists@shadowlab.org>2014-12-18 21:33:38 +0000
commit23dd15e26d81c3230e7dc7b184a5dc8e37e8f3bb (patch)
treeb01942ecb8283f26d86804fb8a8282c310166503 /lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
parentf27ae736175a3cc339af15ffc8ad3cb518224c0c (diff)
downloadbcm5719-llvm-23dd15e26d81c3230e7dc7b184a5dc8e37e8f3bb.tar.gz
bcm5719-llvm-23dd15e26d81c3230e7dc7b184a5dc8e37e8f3bb.zip
[macho] -rpath support
Summary: Work on adding -rpath support to the mach-o linker. This patch is based on the ld64 behavior for the command line option validation. It includes a basic test to check that the LC_RPATH load commands are properly generated when that option is used. It also add LC_RPATH support to the binary reader, but I don't know how to test it though. Reviewers: kledzik Subscribers: llvm-commits Projects: #lld Differential Revision: http://reviews.llvm.org/D6724 llvm-svn: 224544
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index b129c033740..6cdd74ba3bd 100644
--- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -413,6 +413,10 @@ void MachOLinkingContext::setSysLibRoots(const StringRefVector &paths) {
_syslibRoots = paths;
}
+void MachOLinkingContext::addRpath(StringRef rpath) {
+ _rpaths.push_back(rpath);
+}
+
void MachOLinkingContext::addModifiedSearchDir(StringRef libPath,
bool isSystemPath) {
bool addedModifiedPath = false;
OpenPOWER on IntegriCloud