[LLVMdev] native libraries
Ryan M. Lefever
lefever at crhc.uiuc.edu
Sat Mar 31 16:33:39 PDT 2007
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?
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? What is meant by the warning?
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.
More information about the llvm-dev
mailing list