native libraries

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

Hi Ryan,

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.

Reid,

I have filed this as a code cleanup bug.

Reid Spencer wrote: