I think the only way to do this right now is to dump the whole image so you get all the necessary prior definitions. See this comment for the command line:
https://github.com/JuliaLang/julia/issues/9430#issuecomment-67758882 (related to Emscripten, which doesn't work yet, but may work with `lli`). You will need to do various other things including dlload libjulia and supporting shared libraries. On Sat, Mar 14, 2015 at 4:30 AM, Zexuan Luo <spacewander...@gmail.com> wrote: > Hi, everyone. > > I am wonder how to convert Julia code into runnable LLVM IR(the *.ll file). > > There is a call named `code_llvm` can compile Julia function into LLVM IR. > But its result contains something like `%jl_value_t*` hidden the object > type, and makes it not a pure LLVM IR. > > Is there a way to generate runnable LLVM IR from Julia, so that I can run > it with `lli xx.ll` (or do something else)? >