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

Axel Naumann Axel.Naumann at cern.ch
Mon Jan 5 00:32:44 PST 2009


Hi Chris,

On 2009-01-04 21:21, Chris Lattner wrote:
> On Dec 17, 2008, at 7:31 AM, Axel Naumann wrote:
>> 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 ;-)

> 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!

Weird - my Sent folder shows it as outlined. Here's a gz of the diff;
thunderbird: inline _that_!

Thanks for considering the patch!

Cheers, Axel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-ld_EmitShellScript_libpath.diff.gz
Type: application/x-gzip
Size: 690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090105/cc25d57b/attachment.bin>


More information about the llvm-commits mailing list