[LLVMdev] libLTO on Mac OS X

Dan Villiom Podlaski Christiansen danchr at gmail.com
Thu Nov 12 14:56:13 PST 2009


On 12 Nov 2009, at 20:51, Chris Lattner wrote:

> Yes, it looks relative to itself to find it.  If you link with / 
> Developer/usr/bin/ld, it uses /Developer/usr/lib/libLTO.dylib.

Alternatively, you could set the ‘DYLD_LIBRARY_PATH’ environment variable. The paths specified by it are searched *before* the both the path specified in the binary as well as the system fallback path. I often use it myself for newer versions of LLVM; the only caveat is that it won't work for e.g. ‘nm’, ‘ar’ and so on. Unlike ‘ld’ they load the library at runtime using a hardcoded path.

For example:
  DYLD_LIBRARY_PATH=/opt/llvm/lib make -j2

Hope that helps,

--

Dan Villiom Podlaski Christiansen
danchr at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091112/0eea394e/attachment.bin>


More information about the llvm-dev mailing list