[LLVMdev] native libraries

Ryan M. Lefever lefever at crhc.uiuc.edu
Tue Apr 3 19:30:59 PDT 2007


Reid,

I have filed this as a code cleanup bug.

Reid Spencer wrote:
> Hi Ryan,
> 
> On Sat, 2007-03-31 at 18:33 -0500, Ryan M. Lefever wrote:
> 
>>In a previous post (included at the end of the message), Reid stated
>>that in August 2006, llvm-ld did not support native libraries.  I have a
>>few questions about that.  Is it still true that llvm does not support
>>native libraries?  Furthermore, what exactly is meant by that?
> 
> 
> llvm-ld has been worked on (by multiple people) since last August. I'm
> actually not very clear on what its current state is wrt to generating
> native executables. I know that the support (at some level) has been
> added as it will just invoke the native linker to link all the
> components. I'd have to go get familiar with the code again to know.
> 
> 
>>In particular, I have bytecode that I want to turn into a native
>>executable and it needs to be linked against a dynamic (.so) library
>>that I've created.  So, I run the following command:
>>
>>
>>>llvm-ld -native -o mytmp.exe -L. -lmytmp1 mytmp2.bc mytmp3.bc
>>
>>When I do so I get the following warning:
>>
>>
>>>llvm-ld: warning: Supposed library 'mytmp1' isn't a library.
>>
>>However, the executable seems to work fine, and seems to find
>>libmytmp1.so through LD_LIBRARY_PATH just fine.  Is it safe to ignore
>>the warning?  
> 
> 
> Probably. 
> 
> 
>>What is meant by the warning?
> 
> 
> I think its a hold-over from when llvm-ld didn't recognize non-bytecode
> libraries. Could you please file this as a code-cleanup bug so we don't
> forget about it?
> 
> Thanks,
> 
> Reid.
> 
> 
>>Regards,
>>Ryan
>>
>>
>>
>>>On Wed, 2006-08-16 at 18:01 +0200, Bram Adams wrote:
>>>
>>>>Hi,
>>>>
>>>>I'm using LLVM 1.8 with the GCC4-frontend on a Slackware 10.2 box (GCC
>>>>3.3.6). When issuing the following command (line 14 in a script called
>>>>manual.sh):
>>>>
>>>>llvm-ld -O1 *.trans -L${SOME_LIB_DIR} -L${SOME_OTHER_LIB_DIR} -L
>>>>${LLVM_FRONT}/lib -lSOME_LIB -lSOME_OTHER_LIB -load=
>>>>${MY_LIB_DIR}/opt1.so -load=${MY_LIB_DIR}/opt2.so -debug-pass=Details
>>>>-debug -o test
>>>>
>>>>... I get the following messages:
>>>>
>>>>llvm-ld: warning: Supposed library 'SOME_OTHER_LIB' isn't a library.
>>>
>>>The -l option is used to link libraries into the resulting executable.
>>>I'm hoping "SOME_OTHER_LIB" is not the actual name and you're just
>>>paraphrasing the actual command line. Note that native libraries are 
>>>not
>>>supported by llvm-ld at this time. It is expecting a bytecode library
>>>that it can link into the program, hence the warning.
>>
>>
>>_______________________________________________
>>LLVM Developers mailing list
>>LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-- 
Ryan M. Lefever  [http://www.ews.uiuc.edu/~lefever]



More information about the llvm-dev mailing list