[LLVMdev] Circular dependencies

Eric Kidd emk.lists at gmail.com
Tue Mar 21 15:29:22 PST 2006


Reid added some nice inter-library dependency data to utils/llvm- 
config/LibDeps.txt.

There are three sets of circular dependencies between LLVM libraries.  
If you use any library from one of these sets, you may need to pull  
in the rest:

   LLVMCodeGen.o LLVMSelectionDAG.o libLLVMAnalysis.a libLLVMTarget.a
   libLLVMTransformUtils.a libLLVMipa.a

   LLVMSparcV9.o LLVMSparcV9InstrSched.o LLVMSparcV9ModuloSched.o
   LLVMSparcV9RegAlloc.o

   LLVMExecutionEngine.o LLVMInterpreter.o LLVMJIT.o

The first set is the most problematic: It includes four *.a files,  
which means that certain linkers will tend to get confused unless you  
repeat '-l' flags.

The odd entry here is libLLVMipa.a, which gets pulled in by something  
in libLLVMTransformUtils.a, but which doesn't often seem to be needed  
in practice.

The third set is also a bit surprising: You always need to link in an  
interpreter, even when you have a perfectly good JIT.

I hope this information amuses or informs someone. :-)

Cheers,
Eric




More information about the llvm-dev mailing list