Hi, I wanted to load /usr/lib64/libreadline.so into lli (aka "link against it" in llvm-ld). Impossible with llvm-ld, because it uses sys::Path::FindLibrary() which only checks the system lib paths, so it always picked up /usr/lib/libreadline.so. Even copying it into ./mylib, and specifying -L mylib doesn't work - again because sys::Path::FindLibrary() doesn't know about directories specified by -L. Attached patch lets EmitShellScript iterate over LibPaths before asking sys::Path::FindLibrary(), which fixes both of these issues for me: I can specify shlib directories for lli with -L, and I can override libs found in the system paths. My first patch to LLVM so don't be too brutal, please ;-) Cheers, Axel. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: llvm-ld_EmitShellScript_libpath.diff URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081217/d2554e77/attachment.ksh>