How to include IR parser and optimization passes in my project


I am a newbie in LLVM.
I am very impressed with this forum and appreciate your help and time.

I am trying to include llvm IR parser in my codebase, the way I wanna
do is generate llvm's shared object (.so) file and use it in my
So far I haven't been able to generate correct .so's.

When I build a debug build with gmake (have llvm and clang in my
sandbox), I get the following .so.

What am I missing ? how can i build the .so's which I can directly use.

thanks in advance.


Hi Tarique,

You should be able to do:

./configure --enable-shared --enable-jit && make && make install

this should result in a shared library for "LLVM-3.1"

Best, Keith