2004-11-01 09:21:32 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2004-02-27 06:28:34 +00:00
< html >
< head >
2004-10-31 23:00:25 +00:00
< title > Using The LLVM Libraries< / title >
2004-02-27 06:28:34 +00:00
< link rel = "stylesheet" href = "llvm.css" type = "text/css" >
< / head >
< body >
2004-10-31 23:00:25 +00:00
< div class = "doc_title" > Using The LLVM Libraries< / div >
2004-02-27 06:28:34 +00:00
< ol >
< li > < a href = "#abstract" > Abstract< / a > < / li >
< li > < a href = "#introduction" > Introduction< / a > < / li >
2004-10-31 23:00:25 +00:00
< li > < a href = "#descriptions" > Library Descriptions< / a > < / li >
2004-12-30 23:12:04 +00:00
< li > < a href = "#dependencies" > Library Dependencies< / a > < / li >
2004-02-27 06:28:34 +00:00
< li > < a href = "#rot" > Linkage Rules Of Thumb< / a >
< ol >
2004-10-31 23:24:31 +00:00
< li > < a href = "#always" > Always link LLVMCore, LLVMSupport, LLVMSystem< / a >
< li > < a href = "#onlyone" > Never link both archive and re-linked< / a >
2004-02-27 06:28:34 +00:00
< / ol >
< / li >
< / ol >
2004-05-23 21:07:27 +00:00
< div class = "doc_author" >
< p > Written by < a href = "mailto:rspencer@x10sys.com" > Reid Spencer< / a > < / p >
2004-02-27 06:28:34 +00:00
< / div >
2004-05-23 21:07:27 +00:00
2006-04-20 04:57:19 +00:00
< p class = "doc_warning" > Warning: This document is out of date, please see < a href = "CommandGuide/html/llvm-config.html" > llvm-config< / a > for more information.< / p >
2006-04-20 04:55:50 +00:00
2004-02-27 06:28:34 +00:00
<!-- ======================================================================= -->
< div class = "doc_section" > < a name = "abstract" > Abstract< / a > < / div >
< div class = "doc_text" >
2004-10-31 23:00:25 +00:00
< p > Amongst other things, LLVM is a toolkit for building compilers, linkers,
runtime executives, virtual machines, and other program execution related
tools. In addition to the LLVM tool set, the functionality of LLVM is
available through a set of libraries. To use LLVM as a toolkit for
constructing tools, a developer needs to understand what is contained in the
2006-08-01 07:32:01 +00:00
various libraries, what they depend on, and how to use them. Fortunately,
there is a tool, < tt > llvm-config< / tt > to aid with this. This document
describes the contents of the libraries and how to use < tt > llvm-config< / tt >
to generate command line options.
2004-02-27 06:28:34 +00:00
< / p >
< / div >
2004-10-31 23:00:25 +00:00
2004-02-27 06:28:34 +00:00
<!-- ======================================================================= -->
< div class = "doc_section" > < a name = "introduction" > Introduction< / a > < / div >
< div class = "doc_text" >
2004-10-31 23:00:25 +00:00
< p > 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
2006-08-01 07:32:01 +00:00
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.< / p >
2004-10-31 23:00:25 +00:00
< p > LLVM produces two types of libraries: archives (ending in < tt > .a< / tt > ) and
objects (ending in < tt > .o< / tt > ). However, both are libraries. Libraries ending
in < tt > .o< / tt > are known as re-linked libraries because they contain all the
compilation units of the library linked together as a single < tt > .o< / tt > file.
2006-08-01 07:32:01 +00:00
Furthermore, several of the libraries have < em > both< / em > forms of library. The
2004-10-31 23:00:25 +00:00
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. < / p >
2006-08-01 07:32:01 +00:00
< p > If you're using the LLVM Makefile system to link your tools,you will use
the < tt > LLVMLIBS< / tt > make variable.
2004-10-31 23:00:25 +00:00
(see the < a href = "MakefileGuide.html#LLVMLIBS" > Makefile Guide< / a > 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
naming the library without a suffix. You specify archive libraries by naming
the library with a < tt > .a< / tt > suffix but without the < tt > lib< / tt > prefix. The
order in which the libraries appear in the < tt > LLVMLIBS< / tt > variable
definition is the order in which they will be linked. Getting this order
correct for your tool can sometimes be challenging.
2004-02-27 06:28:34 +00:00
< / div >
<!-- ======================================================================= -->
2004-10-31 23:00:25 +00:00
< div class = "doc_section" > < a name = "descriptions" > < / a > Library Descriptions< / div >
2004-02-27 06:28:34 +00:00
< div class = "doc_text" >
2004-10-31 23:00:25 +00:00
< p > The table below categorizes each library
< table style = "text-align:left" >
< tr > < th > Library< / th > < th > Forms< / th > < th > Description< / th > < / tr >
2004-11-01 09:22:49 +00:00
< tr > < th colspan = "3" > Core Libraries< / th > < / tr >
2004-12-31 00:13:14 +00:00
< tr > < td > LLVMArchive< / td > < td > < tt > .a< / tt > < / td >
< td > LLVM archive reading and writing< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMAsmParser< / td > < td > < tt > .a< / tt > < / td >
2004-12-31 00:13:14 +00:00
< td > LLVM assembly parsing< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMBCReader< / td > < td > < tt > .a< / tt > < / td >
2007-07-06 22:07:22 +00:00
< td > LLVM bitcode reading< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMBCWriter< / td > < td > < tt > .a< / tt > < / td >
2007-07-06 22:07:22 +00:00
< td > LLVM bitcode writing< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMCore< / td > < td > < tt > .a< / tt > < / td >
2004-12-31 00:13:14 +00:00
< td > LLVM core intermediate representation< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMDebugger< / td > < td > < tt > .a< / tt > < / td >
2004-12-31 00:13:14 +00:00
< td > Source level debugging support< / td > < / tr >
< tr > < td > LLVMLinker< / td > < td > < tt > .a< / tt > < / td >
2007-07-06 22:07:22 +00:00
< td > Bitcode and archive linking interface< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMSupport< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > General support utilities< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMSystem< / td > < td > < tt > .a< / tt > < / td >
2004-12-31 00:13:14 +00:00
< td > Operating system abstraction layer< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMbzip2< / td > < td > < tt > .a< / tt > < / td >
< td > BZip2 compression library< / td > < / tr >
2004-10-31 23:00:25 +00:00
2004-11-01 09:22:49 +00:00
< tr > < th colspan = "3" > Analysis Libraries< / th > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMAnalysis< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > Various analysis passes.< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMDataStructure< / td > < td > < tt > .o< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > Data structure analysis passes.< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMipa< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > Inter-procedural analysis passes.< / td > < / tr >
2004-10-31 23:00:25 +00:00
2004-11-01 09:22:49 +00:00
< tr > < th colspan = "3" > Transformation Libraries< / th > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMInstrumentation< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > Instrumentation passes.< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMipo< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > All inter-procedural optimization passes.< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMScalarOpts< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > All scalar optimization passes.< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMTransformUtils< / td > < td > < tt > .a< / tt > < / td >
2007-02-04 00:17:35 +00:00
< td > Transformation utilities used by many passes.< / td > < / tr >
2004-10-31 23:00:25 +00:00
2004-11-01 09:22:49 +00:00
< tr > < th colspan = "3" > Code Generation Libraries < / th > < / tr >
2004-10-31 23:24:31 +00:00
< tr > < td > LLVMCodeGen< / td > < td > < tt > .o< / tt > < / td >
< td > Native code generation infrastructure< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMSelectionDAG< / td > < td > < tt > .o< / tt > < / td >
< td > Aggressive instruction selector for directed acyclic graphs< / td > < / tr >
2004-10-31 23:00:25 +00:00
2004-11-01 09:22:49 +00:00
< tr > < th colspan = "3" > Target Libraries< / th > < / tr >
2006-05-13 02:22:01 +00:00
< tr > < td > LLVMAlpha< / td > < td > < tt > .o< / tt > < / td >
< td > Code generation for Alpha architecture< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMARM< / td > < td > < tt > .o< / tt > < / td >
< td > Code generation for ARM architecture< / td > < / tr >
2004-10-31 23:24:31 +00:00
< tr > < td > LLVMCBackend< / td > < td > < tt > .o< / tt > < / td >
< td > 'C' language code generator.< / td > < / tr >
2006-05-13 02:22:01 +00:00
< tr > < td > LLVMIA64< / td > < td > < tt > .o< / tt > < / td >
< td > Code generation for IA64 architecture< / td > < / tr >
2004-10-31 23:24:31 +00:00
< tr > < td > LLVMPowerPC< / td > < td > < tt > .o< / tt > < / td >
2006-05-13 02:22:01 +00:00
< td > Code generation for PowerPC architecture< / td > < / tr >
2006-02-05 06:40:12 +00:00
< tr > < td > LLVMSparc< / td > < td > < tt > .o< / tt > < / td >
2006-05-13 02:22:01 +00:00
< td > Code generation for Sparc architecture< / td > < / tr >
2006-08-01 07:32:01 +00:00
< tr > < td > LLVMTarget< / td > < td > < tt > .a< / tt > < / td >
2004-10-31 23:24:31 +00:00
< td > Generic code generation utilities.< / td > < / tr >
< tr > < td > LLVMX86< / td > < td > < tt > .o< / tt > < / td >
2006-05-13 02:22:01 +00:00
< td > Code generation for Intel x86 architecture< / td > < / tr >
2004-10-31 23:00:25 +00:00
2004-11-01 09:22:49 +00:00
< tr > < th colspan = "3" > Runtime Libraries< / th > < / tr >
2004-10-31 23:24:31 +00:00
< tr > < td > LLVMInterpreter< / td > < td > < tt > .o< / tt > < / td >
2007-07-06 22:07:22 +00:00
< td > Bitcode Interpreter< / td > < / tr >
2004-10-31 23:24:31 +00:00
< tr > < td > LLVMJIT< / td > < td > < tt > .o< / tt > < / td >
2007-07-06 22:07:22 +00:00
< td > Bitcode JIT Compiler< / td > < / tr >
2004-10-31 23:24:31 +00:00
< tr > < td > LLVMExecutionEngine< / td > < td > < tt > .o< / tt > < / td >
< td > Virtual machine engine< / td > < / tr >
2004-02-27 06:28:34 +00:00
< / table >
< / div >
2004-10-31 23:00:25 +00:00
2004-12-30 23:12:04 +00:00
<!-- ======================================================================= -->
2006-08-01 07:32:01 +00:00
< div class = "doc_section" > < a name = "dependencies" > < / a > Using llvm-config< / div >
2004-12-30 23:12:04 +00:00
< div class = "doc_text" >
2006-08-01 16:23:54 +00:00
< p > The < tt > llvm-config< / tt > tool is a perl script that produces on its output
2006-08-01 07:32:01 +00:00
various kinds of information. For example, the source or object directories
used to build LLVM can be accessed by passing options to < tt > llvm-config< / tt > .
For complete details on this tool, please see the
< a href = "CommandGuide/html/llvm-config.html" > manual page< / a > .< / p >
< p > To understand the relationships between libraries, the < tt > llvm-config< / tt >
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:< / p >
< ol >
< li > < tt > --ldflags< / tt > . This generates the command line options necessary to
be passed to the < tt > ld< / tt > tool in order to link with LLVM. Most notably,
the < tt > -L< / tt > option is provided to specify a library search directory
2006-08-01 16:23:54 +00:00
that contains the LLVM libraries.< / li >
2006-08-01 07:32:01 +00:00
< li > < tt > --libs< / tt > . This generates command line options suitable for
use with a gcc-style linker. That is, libraries are given with a -l option
and object files are given with a full path.< / li >
< li > < tt > --libnames< / tt > . This generates a list of just the library file
names. If you know the directory in which these files reside (see --ldflags)
then you can find the libraries there.< / li >
2006-08-01 16:23:54 +00:00
< li > < tt > --libfiles< / tt > . This generates the full path names of the
LLVM library files.< / li >
2006-08-01 07:32:01 +00:00
< / ol >
< p > If you wish to delve further into how < tt > llvm-config< / tt > generates the
correct order (based on library dependencies), please see the tool named
< tt > GenLibDeps.pl< / tt > in the < tt > utils< / tt > source directory of LLVM.< / p >
2004-12-30 23:12:04 +00:00
<!-- =======NOTE: ========================================================= -->
2005-01-03 05:46:46 +00:00
<!-- === The following graphs and <dl> list are generated automatically === -->
<!-- === by the util named GenLibDeps.pl in the llvm/utils directory. === -->
<!-- === This should be updated whenever new libraries are added, === -->
<!-- === removed, or changed === -->
2004-12-30 23:12:04 +00:00
<!-- =======NOTE: ========================================================= -->
2005-01-03 05:46:46 +00:00
< h2 > Dependency Relationships Of Libraries< / h2 >
< p > 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.< / p >
< img src = "img/libdeps.gif" alt = "Library Dependencies" / >
< h2 > Dependency Relationships Of Object Files< / h2 >
< p > 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.< / p >
< img src = "img/objdeps.gif" alt = "Object File Dependencies" / >
< p > 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.< / p >
2004-12-30 23:12:04 +00:00
< dl >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMAnalysis.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMArchive.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMBCReader.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMAsmParser.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMBCReader.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMBCWriter.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMCodeGen.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMAnalysis.a< / li >
< li > libLLVMCore.a< / li >
2007-02-04 00:17:35 +00:00
< li > libLLVMScalarOpts.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< li > libLLVMTarget.a< / li >
2007-02-04 00:17:35 +00:00
< li > libLLVMTransformUtils.a< / li >
2006-08-01 07:32:01 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMCore.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMDebugger.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMBCReader.a< / li >
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMInstrumentation.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2006-05-13 02:22:01 +00:00
< li > libLLVMScalarOpts.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMTransformUtils.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMLinker.a< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMArchive.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMBCReader.a< / li >
< li > libLLVMCore.a< / li >
2007-02-04 00:17:35 +00:00
< li > libLLVMSupport.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSystem.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMScalarOpts.a< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMAnalysis.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< li > libLLVMTarget.a< / li >
< li > libLLVMTransformUtils.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMSelectionDAG.a< / b > < / dt > < dd > < ul >
2007-02-04 00:17:35 +00:00
< li > libLLVMAnalysis.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< li > libLLVMTransformUtils.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMSupport.a< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMSystem.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMbzip2.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMSystem.a< / b > < / dt > < dd > < ul >
2007-02-04 00:17:35 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMTarget.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMTransformUtils.a< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMAnalysis.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2007-02-04 00:17:35 +00:00
< li > libLLVMTarget.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMipa.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMbzip2.a< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMipa.a< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMAnalysis.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMipo.a< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMAnalysis.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< li > libLLVMTransformUtils.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMipa.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > libLLVMlto.a< / b > < / dt > < dd > < ul >
2007-02-04 00:17:35 +00:00
< li > libLLVMAnalysis.a< / li >
< li > libLLVMBCReader.a< / li >
< li > libLLVMBCWriter.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMLinker.a< / li >
< li > libLLVMScalarOpts.a< / li >
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< li > libLLVMTarget.a< / li >
< li > libLLVMipa.a< / li >
< li > libLLVMipo.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMARM.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSelectionDAG.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMAlpha.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSelectionDAG.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMTarget.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMCBackend.o< / b > < / dt > < dd > < ul >
2004-12-30 23:12:04 +00:00
< li > libLLVMAnalysis.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMScalarOpts.a< / li >
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
2007-02-04 00:17:35 +00:00
< li > libLLVMTransformUtils.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMipa.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMExecutionEngine.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMIA64.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSelectionDAG.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2006-05-13 02:22:01 +00:00
< li > libLLVMTarget.a< / li >
2004-12-30 23:12:04 +00:00
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMInterpreter.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > LLVMExecutionEngine.o< / li >
2007-02-04 00:17:35 +00:00
< li > libLLVMCodeGen.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMJIT.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > LLVMExecutionEngine.o< / li >
< li > libLLVMCore.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
< li > libLLVMSystem.a< / li >
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMPowerPC.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSelectionDAG.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-05-13 02:22:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMSparc.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSelectionDAG.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
2008-10-14 17:00:38 +00:00
< dt > < b > LLVMX86.o< / b > < / dt > < dd > < ul >
2006-08-01 07:32:01 +00:00
< li > libLLVMCodeGen.a< / li >
< li > libLLVMCore.a< / li >
< li > libLLVMSelectionDAG.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMSupport.a< / li >
2006-08-01 07:32:01 +00:00
< li > libLLVMSystem.a< / li >
2004-12-30 23:12:04 +00:00
< li > libLLVMTarget.a< / li >
< / ul > < / dd >
< / dl >
< / div >
2004-02-27 06:28:34 +00:00
<!-- ======================================================================= -->
< div class = "doc_section" > < a name = "rot" > Linkage Rules Of Thumb< / a > < / div >
< div class = "doc_text" >
< p > This section contains various "rules of thumb" about what files you
should link into your programs.< / p >
< / div >
<!-- ======================================================================= -->
2004-11-08 00:22:22 +00:00
< div class = "doc_subsection" > < a name = "always" > Always Link LLVMCore, LLVMSupport,
and LLVMSystem< / a > < / div >
2004-02-27 06:28:34 +00:00
< div class = "doc_text" >
2004-11-08 00:26:32 +00:00
< p > No matter what you do with LLVM, the last three entries in the value of
your LLVMLIBS make variable should always be:
< tt > LLVMCore LLVMSupport.a LLVMSystem.a< / tt > . There are no < tt > LLVM< / tt >
programs that don't depend on these three.< / p >
2004-02-27 06:28:34 +00:00
< / div >
<!-- ======================================================================= -->
2004-10-31 23:00:25 +00:00
< div class = "doc_subsection" > < a name = "onlyone" > Never link both archive and
re-linked library< / a > < / div >
2004-02-27 06:28:34 +00:00
< div class = "doc_text" >
2004-10-31 23:00:25 +00:00
< p > There is never any point to linking both the re-linked (< tt > .o< / tt > ) and
the archive (< tt > .a< / tt > ) versions of a library. Since the re-linked version
includes the entire library, the archive version will not resolve any symbols.
2004-11-08 00:24:43 +00:00
You could even end up with link error if you place the archive version before
2004-10-31 23:00:25 +00:00
the re-linked version on the linker's command line.< / p >
2004-02-27 06:28:34 +00:00
< / div >
<!-- ======================================================================= -->
< hr >
< div class = "doc_footer" >
2004-11-01 09:19:53 +00:00
< address >
< a href = "http://jigsaw.w3.org/css-validator/check/referer" > < img
2008-12-11 17:34:48 +00:00
src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"/>< / a >
2004-11-01 09:19:53 +00:00
< a href = "http://validator.w3.org/check/referer" > < img
2008-12-11 18:23:24 +00:00
src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01">< / a >
2004-11-01 09:19:53 +00:00
< a href = "mailto:rspencer@x10sys.com" > Reid Spencer< / a >
< / address >
2006-03-14 05:39:39 +00:00
< a href = "http://llvm.org" > The LLVM Compiler Infrastructure< / a >
2004-02-27 06:28:34 +00:00
< br > Last modified: $Date$ < / div >
< / body >
< / html >
<!-- vim: sw=2 ts=2 ai
-->