[PATCH] 2nd try: enabling clients to use rpath to find LLVM shared libraries on OS X

Benjamin Scarlet flld0 at greynode.net
Tue Jul 9 17:04:07 PDT 2013


I sent this patch at a rather inopportune time, and it doesn't seem to have caught anyone's attention. On the advice of some helpful folks on IRC, I'm trying again.

Begin forwarded message:

> From: Benjamin Scarlet <flld0 at greynode.net>
> Subject: enabling clients to use rpath to find LLVM shared libraries on OS X
> Date: July 6, 2013 8:58:00 AM EDT
> To: llvm-commits at cs.uiuc.edu
> 
> Could someone please review and apply this patch (or ask for further work, etc. etc.)?
> 
> The attached patch changes the install name built into libLLVM-<version>.dylib, libLTO.dylib, and libprofile_rt.dylib from @executable_path/../lib/<libraryname> to @rpath/<libraryname> on OS X.
> 
> Without this patch, on OS X, only executables installed inside the LLVM install directory hierarchy can find the LLVM shared libraries without using DYLD_LIBRARY_PATH - the install name does not allow the use of an rpath.
> 
> With this patch, an executable which is linked against those libraries will honor a specified rpath, and so the overall behavior is the same as on, e.g., Linux.
> 
> Because the LLVM binaries are already built with such an rpath (probably because it's necessary on other platforms), no additional change is necessary to keep them finding their dependencies.
> 
> Thanks for looking,
> Ben Scarlet
> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130709/92a95802/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-rpath.patch
Type: application/octet-stream
Size: 1674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130709/92a95802/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130709/92a95802/attachment-0001.html>


More information about the llvm-commits mailing list