[LLVMdev] Using LLVM to compile system programs
Sean Peisert
peisert at gmail.com
Wed Nov 9 14:22:18 PST 2005
Thanks, Chris.
> > I'm having a bit of difficulty using LLVM to compile system programs
> > (e.g. rsh) on FreeBSD 5.x.
> There are three basic options here:
>
> 1. Build all your code with LLVM.
> 2. Build the non-llvm parts into a dynamic library, and use "lli -load
> x.so <other options>" to load it.
> 3. Link the non-llvm parts into LLI.
Option #2 turned out to be the easiest option for a single program,
however if I were interested in recompiling _all_ of the system
programs, I suspect that it would not be. However I assume, option #3
would require linking LLI with _all_ of the system's libraries, which
seems nutty, and option #1 is likely to fail for at least some system
libraries due to inline assembly. Do my assumptions seem correct?
Has an OS (or at least the sytem applications on it) ever been
compiled with LLVM?
Thanks,
Sean
More information about the llvm-dev
mailing list