[LLVMdev] gfortran: patch, question

Chris Lattner sabre at nondot.org
Sat Sep 2 11:27:11 PDT 2006


On Fri, 1 Sep 2006, Michael McCracken wrote:
> I'm now testing on a couple of simple examples.
> gfortran+llvm compiles my simplest example into native code correctly.
> There are some issues with a more complicated example, but at least
> this is a start.

Cool, you're making great progress.

> I can generate llvm asm and bytecode using --emit-llvm -[S,c], but I
> can't run the resulting files in lli. I am guessing that I would need
> to compile libgfortran as bytecode and link it with llvm-link to get
> that to work, right? I don't need to do that just yet, although I will
> want to be able to run that way eventually.

If LLI is your goal, there are two possibilities: you can either compile 
the runtime library to .bc file which you statically llvm-link in, or you 
can compile it to a .so file, which you ask lli to load, like this:

$ lli -load myruntimelib.so  myprogram.bc <args>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list