[LLVMdev] Linking with C Library

Nick Lewycky nicholas at mxc.ca
Mon Apr 5 22:09:57 PDT 2010


Nyx wrote:
>
>>> Ok, you've passed my expertise. Maybe you have to link with -lc?
> Hopefully one of the ocaml experts will chime in.
>
> I figured out what was wrong. LLVM needs to be compiled with --enable-libffi
> for the external symbol resolution to work properly. This is unfortunately
> not mentioned in the OCaml version of the LLVM Kaleidoscope tutorials!

If that fixed your problem then you aren't using the JIT. 
--enable-libffi only affects the (very slow and unmaintained) interpreter.

You may want to focus on why you're failing to correctly initialize the 
JIT. Are you calling InitializeNativeTarget()?

Nick




More information about the llvm-dev mailing list