[llvm-commits] [PATCH] llvm-ld EmitShellScript and -L

Chris Lattner clattner at apple.com
Sun Jan 4 12:21:05 PST 2009


On Dec 17, 2008, at 7:31 AM, Axel Naumann wrote:

> 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 ;-)

Hi Axel,

I don't personally use llvm-ld, so I don't have a strong opinion about  
the patch.  However, please send it as an out-of-line attachment.   
Without that, it is very difficult to apply, thanks!

-Chris




More information about the llvm-commits mailing list