enabling clients to use rpath to find LLVM shared libraries on OS X

Benjamin Scarlet flld0 at greynode.net
Sat Jul 6 05:58:00 PDT 2013


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 --------------
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/20130706/dd9a1648/attachment.obj>
-------------- next part --------------





More information about the llvm-commits mailing list