[LLVMdev] link problem with llvm-pass

John Criswell criswell at cs.uiuc.edu
Mon Jan 5 07:32:04 PST 2009


Nico wrote:
> Dear John,
>
> thanks! I was irritated by the path of the header file/declaration.
> It is not like the definition in a subdirectory. Sorry my fault.
>
> Is there an overview where classes and link options are mapped to each  
> other?
>   
If there is one, I do not know of it.

My method for determining which library to link is twofold:

1) Since I have a general understanding of LLVM's libraries, I can make 
educated guesses if I know what the pass does.  If it's an 
inter-procedural analysis pass, then it's in LLVMipa.  If it's something 
to do with code generation, then it's probably in LLVMCodeGen.  There's 
a list of the libraries at 
http://llvm.org/docs/UsingLibraries.html#descriptions.

2) If that doesn't work, I use xargs/grep to search the source base for 
the class's implementation.  I then look at the Makefile in the same 
directory to figure out which library it's being compiled into.

I know this may not seem convenient, but it actually works pretty well, 
and the longer you work with LLVM, the easier it gets.

-- John T.

> Kind regards,
> Nico
>
> On Jan 4, 2009, at 4:07 PM, John Criswell wrote:
>
>   




More information about the llvm-dev mailing list