This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Support -rpath
ClosedPublic

Authored by int3 on Aug 10 2020, 6:43 PM.

Details

Reviewers
compnerd
Group Reviewers
Restricted Project
Commits
rGe48d1262b88f: [lld-macho] Support -rpath
Summary

Pretty straightforward; just emits LC_RPATH for dyld to consume.

Note that lld itself does not yet support dylib lookup via @rpath.

Diff Detail

Event Timeline

int3 created this revision.Aug 10 2020, 6:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2020, 6:43 PM
int3 requested review of this revision.Aug 10 2020, 6:43 PM
compnerd accepted this revision.Aug 11 2020, 8:32 PM
compnerd added a subscriber: compnerd.

LGTM with the renaming of the local variable. Thanks for implementing this (it was the next item I wanted to add)!

lld/MachO/Config.h
44

I don't think that rPaths is correct ... rpaths would be correct here, or runtimePaths.

lld/MachO/Writer.cpp
268

I wish we could use strlcpy.

This revision is now accepted and ready to land.Aug 11 2020, 8:32 PM
int3 updated this revision to Diff 284962.Aug 11 2020, 9:14 PM
int3 marked an inline comment as done.

runtimePaths

This revision was landed with ongoing or failed builds.Aug 12 2020, 7:51 PM
This revision was automatically updated to reflect the committed changes.