[LLVMdev] Byte code libraries and linking
Chris Lattner
sabre at nondot.org
Wed Nov 15 10:16:49 PST 2006
On Wed, 15 Nov 2006, [ISO-8859-1] Pertti Kellomäki wrote:
> I succesfully built a byte code version of newlib, so I tried to
> use it like this:
>
> $ llvm-link hello.bc $NEWLIB/libc.a -o linked.bc
>
> but apparently llvm-link only understands byte code files.
Right, llvm-link is the low level bytecode linking interface, not really
useful for this sort of use.
> Does it even make sense to try to use llvm-link as a ld replacement
> this way? Or am I missing something else that could be used?
The 'gccld' tool understands archives. Try:
gccld hello.bc .../libc.a -o linked.bc -link-as-library
"-link-as-library" causes it to emit a .bc file instead of trying to link
an app.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list