X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FUsingLibraries.html;h=af57907ef66a730bbc6977265999d2afb5a862fe;hb=80f3d46968c56bb93597248d7e0157e746c5ce1b;hp=14312fc8f337b3b845b1ac17b05b7ae7821b75db;hpb=347e2880e5a774eac053ea214378511292784221;p=oota-llvm.git diff --git a/docs/UsingLibraries.html b/docs/UsingLibraries.html index 14312fc8f33..af57907ef66 100644 --- a/docs/UsingLibraries.html +++ b/docs/UsingLibraries.html @@ -10,6 +10,7 @@
Written by Reid Spencer
+Warning: This document is out of date, please see llvm-config for more information.
+If you're writing a compiler, virtual machine, or any other utility based on LLVM, you'll need to figure out which of the many libraries files you will need to link with to be successful. An understanding of the contents of these - files and their inter-relationships will be useful in coming up with an optimal - specification for the libraries to link with. The purpose of this document is - to reduce some of the trial and error that the author experienced in using - LLVM.
+ libraries will be useful in coming up with an optimal specification for the + libraries to link with. The purpose of this document is to reduce some of + the trial and error that the author experienced in using LLVM.LLVM produces two types of libraries: archives (ending in .a) and objects (ending in .o). However, both are libraries. Libraries ending in .o are known as re-linked libraries because they contain all the compilation units of the library linked together as a single .o file. - Furthermore, many of the libraries have both forms of library. The + Furthermore, several of the libraries have both forms of library. The re-linked libraries are used whenever you want to include all symbols from the library. The archive libraries are used whenever you want to only resolve outstanding symbols at that point in the link without including everything in the library.
-When linking your tools, you will use the LLVMLIBS make variable. +
If you're using the LLVM Makefile system to link your tools,you will use + the LLVMLIBS make variable. (see the Makefile Guide for details). This variable specifies which LLVM libraries to link into your tool and the order in which they will be linked. You specify re-linked libraries by @@ -71,83 +76,336 @@
Library | Forms | Description |
---|---|---|
Core Libraries | ||
LLVMAsmParser | .o | -LLVM Assembly Parsing |
LLVMBCReader | .o | -LLVM Bytecode Reading |
LLVMBCWriter | .o | -LLVM Bytecode Writing |
LLVMDebugger | .o | -Source Level Debugging Support |
LLVMSupport | .a .o | +|
LLVMArchive | .a | +LLVM archive reading and writing |
LLVMAsmParser | .a | +LLVM assembly parsing |
LLVMBCReader | .a | +LLVM bitcode reading |
LLVMBCWriter | .a | +LLVM bitcode writing |
LLVMCore | .a | +LLVM core intermediate representation |
LLVMDebugger | .a | +Source level debugging support |
LLVMLinker | .a | +Bitcode and archive linking interface |
LLVMSupport | .a | General support utilities |
LLVMSystem | .a .o | -Operating system abstraction |
LLVMCore | .o | -LLVM Core IR |
LLVMSystem | .a | +Operating system abstraction layer |
LLVMbzip2 | .a | +BZip2 compression library |
Analysis Libraries | ||
LLVMAnalysis | .a .o | +|
LLVMAnalysis | .a | Various analysis passes. |
LLVMDataStructure | .a .o | +|
LLVMDataStructure | .o | Data structure analysis passes. |
LLVMipa | .a .o | +|
LLVMipa | .a | Inter-procedural analysis passes. |
Transformation Libraries | ||
LLVMInstrumentation | .a .o | +|
LLVMInstrumentation | .a | Instrumentation passes. |
LLVMipo | .a .o | +|
LLVMipo | .a | All inter-procedural optimization passes. |
LLVMScalarOpts | .a .o | +|
LLVMScalarOpts | .a | All scalar optimization passes. |
LLVMTransforms | .a .o | -Uncategorized transformation passes. |
LLVMTransformUtils | .a .o | -Transformation utilities. |
LLVMProfilePaths | .o | -Profile paths for instrumentation. |
LLVMTransformUtils | .a | +Transformation utilities used by many passes. |
Code Generation Libraries | ||
LLVMCodeGen | .o | Native code generation infrastructure |
LLVMSelectionDAG | .o | +Aggressive instruction selector for directed acyclic graphs |
Target Libraries | ||
LLVMAlpha | .o | +Code generation for Alpha architecture |
LLVMARM | .o | +Code generation for ARM architecture |
LLVMCBackend | .o | 'C' language code generator. |
LLVMIA64 | .o | +Code generation for IA64 architecture |
LLVMPowerPC | .o | -PowerPC code generation backend |
LLVMSelectionDAG | .o | -Aggressive instruction selector for Directed Acyclic Graphs. |
LLVMSkeleton | .a .o | -Skeleton for a code generation backend. |
LLVMSparcV9 | .o | -Code generation for SparcV9. |
LLVMSparcV9RegAlloc | .a .o | -Graph-coloring register allocator for SparcV9. |
LLVMSparcV9InstrSched | .o | -Instruction scheduling for SparcV9. |
LLVMSparcV9LiveVar | .o | -Live variable analysis SparcV9. |
LLVMSparcV9ModuloSched | .o | -Modulo scheduling for SparcV9. |
LLVMTarget | .a .o | +Code generation for PowerPC architecture |
LLVMSparc | .o | +Code generation for Sparc architecture |
LLVMTarget | .a | Generic code generation utilities. |
LLVMX86 | .o | -Intel x86 code generation backend | Code generation for Intel x86 architecture |
Runtime Libraries | ||
LLVMInterpreter | .o | -Bytecode Interpreter | Bitcode Interpreter |
LLVMJIT | .o | -Bytecode JIT Compiler | Bitcode JIT Compiler |
LLVMExecutionEngine | .o | Virtual machine engine |
LLVMexecve | .o | -execve(2) replacement for llee |
The llvm-config tool is a perl script that produces on its output + various kinds of information. For example, the source or object directories + used to build LLVM can be accessed by passing options to llvm-config. + For complete details on this tool, please see the + manual page.
+To understand the relationships between libraries, the llvm-config + can be very useful. If all you know is that you want certain libraries to + be available, you can generate the complete set of libraries to link with + using one of four options, as below:
+If you wish to delve further into how llvm-config generates the + correct order (based on library dependencies), please see the tool named + GenLibDeps.pl in the utils source directory of LLVM.
+ + + + + + + +This graph shows the dependency of archive libraries on other archive + libraries or objects. Where a library has both archive and object forms, only + the archive form is shown.
+This graph shows the dependency of object files on archive libraries or + other objects. Where a library has both object and archive forms, only the + dependency to the archive form is shown.
+The following list shows the dependency relationships between libraries in + textual form. The information is the same as shown on the graphs but arranged + alphabetically.
+No matter what you do with LLVM, the last three entries in your linke line - should always be: LLVMCore LLVMSupport.a LLVMSystem.a.
+No matter what you do with LLVM, the last three entries in the value of + your LLVMLIBS make variable should always be: + LLVMCore LLVMSupport.a LLVMSystem.a. There are no LLVM + programs that don't depend on these three.