blob: ac148f786345e1679c119554fda89f466f62fb9e [file] [log] [blame]
Reid Spencercbadf802004-11-01 09:21:32 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Chris Lattner61757352004-02-27 06:28:34 +00002<html>
3<head>
Reid Spencer341d7142004-10-31 23:00:25 +00004 <title>Using The LLVM Libraries</title>
Chris Lattner61757352004-02-27 06:28:34 +00005 <link rel="stylesheet" href="llvm.css" type="text/css">
6</head>
7<body>
Reid Spencer341d7142004-10-31 23:00:25 +00008<div class="doc_title">Using The LLVM Libraries</div>
Chris Lattner61757352004-02-27 06:28:34 +00009<ol>
10 <li><a href="#abstract">Abstract</a></li>
11 <li><a href="#introduction">Introduction</a></li>
Reid Spencer341d7142004-10-31 23:00:25 +000012 <li><a href="#descriptions">Library Descriptions</a></li>
Reid Spencere0f33ae2004-12-30 23:12:04 +000013 <li><a href="#dependencies">Library Dependencies</a></li>
Chris Lattner61757352004-02-27 06:28:34 +000014 <li><a href="#rot">Linkage Rules Of Thumb</a>
15 <ol>
Reid Spencer41482662004-10-31 23:24:31 +000016 <li><a href="#always">Always link LLVMCore, LLVMSupport, LLVMSystem</a>
17 <li><a href="#onlyone">Never link both archive and re-linked</a>
Chris Lattner61757352004-02-27 06:28:34 +000018 </ol>
19 </li>
20</ol>
Chris Lattner7911ce22004-05-23 21:07:27 +000021
22<div class="doc_author">
23 <p>Written by <a href="mailto:rspencer@x10sys.com">Reid Spencer</a></p>
Chris Lattner61757352004-02-27 06:28:34 +000024</div>
Chris Lattner7911ce22004-05-23 21:07:27 +000025
Tanya Lattner2b873622006-04-20 04:57:19 +000026<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>
Tanya Lattnerd006d3a2006-04-20 04:55:50 +000027
Chris Lattner61757352004-02-27 06:28:34 +000028<!-- ======================================================================= -->
29<div class="doc_section"><a name="abstract">Abstract</a></div>
30<div class="doc_text">
Reid Spencer341d7142004-10-31 23:00:25 +000031 <p>Amongst other things, LLVM is a toolkit for building compilers, linkers,
32 runtime executives, virtual machines, and other program execution related
33 tools. In addition to the LLVM tool set, the functionality of LLVM is
34 available through a set of libraries. To use LLVM as a toolkit for
35 constructing tools, a developer needs to understand what is contained in the
Reid Spencere131ec92006-08-01 07:32:01 +000036 various libraries, what they depend on, and how to use them. Fortunately,
37 there is a tool, <tt>llvm-config</tt> to aid with this. This document
38 describes the contents of the libraries and how to use <tt>llvm-config</tt>
39 to generate command line options.
Chris Lattner61757352004-02-27 06:28:34 +000040</p>
41</div>
Reid Spencer341d7142004-10-31 23:00:25 +000042
Chris Lattner61757352004-02-27 06:28:34 +000043<!-- ======================================================================= -->
44<div class="doc_section"> <a name="introduction">Introduction</a></div>
45<div class="doc_text">
Reid Spencer341d7142004-10-31 23:00:25 +000046 <p>If you're writing a compiler, virtual machine, or any other utility based
47 on LLVM, you'll need to figure out which of the many libraries files you will
48 need to link with to be successful. An understanding of the contents of these
Reid Spencere131ec92006-08-01 07:32:01 +000049 libraries will be useful in coming up with an optimal specification for the
50 libraries to link with. The purpose of this document is to reduce some of
51 the trial and error that the author experienced in using LLVM.</p>
Reid Spencer341d7142004-10-31 23:00:25 +000052 <p>LLVM produces two types of libraries: archives (ending in <tt>.a</tt>) and
53 objects (ending in <tt>.o</tt>). However, both are libraries. Libraries ending
54 in <tt>.o</tt> are known as re-linked libraries because they contain all the
55 compilation units of the library linked together as a single <tt>.o</tt> file.
Reid Spencere131ec92006-08-01 07:32:01 +000056 Furthermore, several of the libraries have <em>both</em> forms of library. The
Reid Spencer341d7142004-10-31 23:00:25 +000057 re-linked libraries are used whenever you want to include all symbols from the
58 library. The archive libraries are used whenever you want to only resolve
59 outstanding symbols at that point in the link without including everything in
60 the library. </p>
Reid Spencere131ec92006-08-01 07:32:01 +000061 <p>If you're using the LLVM Makefile system to link your tools,you will use
62 the <tt>LLVMLIBS</tt> make variable.
Reid Spencer341d7142004-10-31 23:00:25 +000063 (see the <a href="MakefileGuide.html#LLVMLIBS">Makefile Guide</a> for
64 details). This variable specifies which LLVM libraries to link into your tool
65 and the order in which they will be linked. You specify re-linked libraries by
66 naming the library without a suffix. You specify archive libraries by naming
67 the library with a <tt>.a</tt> suffix but without the <tt>lib</tt> prefix. The
68 order in which the libraries appear in the <tt>LLVMLIBS</tt> variable
69 definition is the order in which they will be linked. Getting this order
70 correct for your tool can sometimes be challenging.
Chris Lattner61757352004-02-27 06:28:34 +000071</div>
72<!-- ======================================================================= -->
Reid Spencer341d7142004-10-31 23:00:25 +000073<div class="doc_section"><a name="descriptions"></a>Library Descriptions</div>
Chris Lattner61757352004-02-27 06:28:34 +000074<div class="doc_text">
Reid Spencer341d7142004-10-31 23:00:25 +000075 <p>The table below categorizes each library
76<table style="text-align:left">
77 <tr><th>Library</th><th>Forms</th><th>Description</th></tr>
Reid Spencer0a4e8b32004-11-01 09:22:49 +000078 <tr><th colspan="3">Core Libraries</th></tr>
Reid Spencer139e1662004-12-31 00:13:14 +000079 <tr><td>LLVMArchive</td><td><tt>.a</tt></td>
80 <td>LLVM archive reading and writing</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000081 <tr><td>LLVMAsmParser</td><td><tt>.a</tt></td>
Reid Spencer139e1662004-12-31 00:13:14 +000082 <td>LLVM assembly parsing</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000083 <tr><td>LLVMBCReader</td><td><tt>.a</tt></td>
Reid Spencer139e1662004-12-31 00:13:14 +000084 <td>LLVM bytecode reading</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000085 <tr><td>LLVMBCWriter</td><td><tt>.a</tt></td>
Reid Spencer139e1662004-12-31 00:13:14 +000086 <td>LLVM bytecode writing</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000087 <tr><td>LLVMCore</td><td><tt>.a</tt></td>
Reid Spencer139e1662004-12-31 00:13:14 +000088 <td>LLVM core intermediate representation</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000089 <tr><td>LLVMDebugger</td><td><tt>.a</tt></td>
Reid Spencer139e1662004-12-31 00:13:14 +000090 <td>Source level debugging support</td></tr>
91 <tr><td>LLVMLinker</td><td><tt>.a</tt></td>
92 <td>Bytecode and archive linking interface</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000093 <tr><td>LLVMSupport</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +000094 <td>General support utilities</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000095 <tr><td>LLVMSystem</td><td><tt>.a</tt></td>
Reid Spencer139e1662004-12-31 00:13:14 +000096 <td>Operating system abstraction layer</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +000097 <tr><td>LLVMbzip2</td><td><tt>.a</tt></td>
98 <td>BZip2 compression library</td></tr>
Reid Spencer341d7142004-10-31 23:00:25 +000099
Reid Spencer0a4e8b32004-11-01 09:22:49 +0000100 <tr><th colspan="3">Analysis Libraries</th></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000101 <tr><td>LLVMAnalysis</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000102 <td>Various analysis passes.</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000103 <tr><td>LLVMDataStructure</td><td><tt>.o</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000104 <td>Data structure analysis passes.</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000105 <tr><td>LLVMipa</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000106 <td>Inter-procedural analysis passes.</td></tr>
Reid Spencer341d7142004-10-31 23:00:25 +0000107
Reid Spencer0a4e8b32004-11-01 09:22:49 +0000108 <tr><th colspan="3">Transformation Libraries</th></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000109 <tr><td>LLVMInstrumentation</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000110 <td>Instrumentation passes.</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000111 <tr><td>LLVMipo</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000112 <td>All inter-procedural optimization passes.</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000113 <tr><td>LLVMScalarOpts</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000114 <td>All scalar optimization passes.</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000115 <tr><td>LLVMTransforms</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000116 <td>Uncategorized transformation passes.</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000117 <tr><td>LLVMTransformUtils</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000118 <td>Transformation utilities.</td></tr>
Reid Spencer341d7142004-10-31 23:00:25 +0000119
Reid Spencer0a4e8b32004-11-01 09:22:49 +0000120 <tr><th colspan="3">Code Generation Libraries </th></tr>
Reid Spencer41482662004-10-31 23:24:31 +0000121 <tr><td>LLVMCodeGen</td><td><tt>.o</tt></td>
122 <td>Native code generation infrastructure</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000123 <tr><td>LLVMSelectionDAG</td><td><tt>.o</tt></td>
124 <td>Aggressive instruction selector for directed acyclic graphs</td></tr>
Reid Spencer341d7142004-10-31 23:00:25 +0000125
Reid Spencer0a4e8b32004-11-01 09:22:49 +0000126 <tr><th colspan="3">Target Libraries</th></tr>
Reid Spencerd42037a2006-05-13 02:22:01 +0000127 <tr><td>LLVMAlpha</td><td><tt>.o</tt></td>
128 <td>Code generation for Alpha architecture</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000129 <tr><td>LLVMARM</td><td><tt>.o</tt></td>
130 <td>Code generation for ARM architecture</td></tr>
Reid Spencer41482662004-10-31 23:24:31 +0000131 <tr><td>LLVMCBackend</td><td><tt>.o</tt></td>
132 <td>'C' language code generator.</td></tr>
Reid Spencerd42037a2006-05-13 02:22:01 +0000133 <tr><td>LLVMIA64</td><td><tt>.o</tt></td>
134 <td>Code generation for IA64 architecture</td></tr>
Reid Spencer41482662004-10-31 23:24:31 +0000135 <tr><td>LLVMPowerPC</td><td><tt>.o</tt></td>
Reid Spencerd42037a2006-05-13 02:22:01 +0000136 <td>Code generation for PowerPC architecture</td></tr>
Chris Lattner029e8442006-02-05 06:40:12 +0000137 <tr><td>LLVMSparc</td><td><tt>.o</tt></td>
Reid Spencerd42037a2006-05-13 02:22:01 +0000138 <td>Code generation for Sparc architecture</td></tr>
Reid Spencere131ec92006-08-01 07:32:01 +0000139 <tr><td>LLVMTarget</td><td><tt>.a</tt></td>
Reid Spencer41482662004-10-31 23:24:31 +0000140 <td>Generic code generation utilities.</td></tr>
141 <tr><td>LLVMX86</td><td><tt>.o</tt></td>
Reid Spencerd42037a2006-05-13 02:22:01 +0000142 <td>Code generation for Intel x86 architecture</td></tr>
Reid Spencer341d7142004-10-31 23:00:25 +0000143
Reid Spencer0a4e8b32004-11-01 09:22:49 +0000144 <tr><th colspan="3">Runtime Libraries</th></tr>
Reid Spencer41482662004-10-31 23:24:31 +0000145 <tr><td>LLVMInterpreter</td><td><tt>.o</tt></td>
146 <td>Bytecode Interpreter</td></tr>
147 <tr><td>LLVMJIT</td><td><tt>.o</tt></td>
148 <td>Bytecode JIT Compiler</td></tr>
149 <tr><td>LLVMExecutionEngine</td><td><tt>.o</tt></td>
150 <td>Virtual machine engine</td></tr>
Chris Lattner61757352004-02-27 06:28:34 +0000151</table>
152</div>
Reid Spencer341d7142004-10-31 23:00:25 +0000153
Chris Lattner61757352004-02-27 06:28:34 +0000154<!-- ======================================================================= -->
Reid Spencere131ec92006-08-01 07:32:01 +0000155<div class="doc_section"><a name="dependencies"></a>Using llvm-config</div>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000156<div class="doc_text">
Reid Spencere131ec92006-08-01 07:32:01 +0000157 <p>The <p>llvm-config</p> tool is a perl script that produces on its output
158 various kinds of information. For example, the source or object directories
159 used to build LLVM can be accessed by passing options to <tt>llvm-config</tt>.
160 For complete details on this tool, please see the
161 <a href="CommandGuide/html/llvm-config.html">manual page</a>.</p>
162 <p>To understand the relationships between libraries, the <tt>llvm-config</tt>
163 can be very useful. If all you know is that you want certain libraries to
164 be available, you can generate the complete set of libraries to link with
165 using one of four options, as below:</p>
166 <ol>
167 <li><tt>--ldflags</tt>. This generates the command line options necessary to
168 be passed to the <tt>ld</tt> tool in order to link with LLVM. Most notably,
169 the <tt>-L</tt> option is provided to specify a library search directory
170 that contains the LLVM libraries.
171 <li><tt>--libs</tt>. This generates command line options suitable for
172 use with a gcc-style linker. That is, libraries are given with a -l option
173 and object files are given with a full path.</li>
174 <li><tt>--libnames</tt>. This generates a list of just the library file
175 names. If you know the directory in which these files reside (see --ldflags)
176 then you can find the libraries there.</li>
177 <li><tt>--libfiles</tt></li>. This generates the full path names of the
178 LLVM library files.
179 </ol>
180 <p>If you wish to delve further into how <tt>llvm-config</tt> generates the
181 correct order (based on library dependencies), please see the tool named
182 <tt>GenLibDeps.pl</tt> in the <tt>utils</tt> source directory of LLVM.</p>
183
Reid Spencere0f33ae2004-12-30 23:12:04 +0000184 <!-- =======NOTE: =========================================================-->
Reid Spencer43ff9002005-01-03 05:46:46 +0000185 <!-- === The following graphs and <dl> list are generated automatically ===-->
186 <!-- === by the util named GenLibDeps.pl in the llvm/utils directory. ===-->
187 <!-- === This should be updated whenever new libraries are added, ===-->
188 <!-- === removed, or changed ===-->
Reid Spencere0f33ae2004-12-30 23:12:04 +0000189 <!-- =======NOTE: =========================================================-->
Reid Spencer43ff9002005-01-03 05:46:46 +0000190 <h2>Dependency Relationships Of Libraries</h2>
191 <p>This graph shows the dependency of archive libraries on other archive
192 libraries or objects. Where a library has both archive and object forms, only
193 the archive form is shown.</p>
194 <img src="img/libdeps.gif" alt="Library Dependencies"/>
195 <h2>Dependency Relationships Of Object Files</h2>
196 <p>This graph shows the dependency of object files on archive libraries or
197 other objects. Where a library has both object and archive forms, only the
198 dependency to the archive form is shown.</p>
199 <img src="img/objdeps.gif" alt="Object File Dependencies"/>
200 <p>The following list shows the dependency relationships between libraries in
201 textual form. The information is the same as shown on the graphs but arranged
202 alphabetically.</p>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000203<dl>
204 <dt><b>libLLVMAnalysis.a</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000205 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000206 <li>libLLVMSupport.a</li>
207 <li>libLLVMSystem.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000208 <li>libLLVMTarget.a</li>
209 </ul></dd>
210 <dt><b>libLLVMArchive.a</b</dt><dd><ul>
211 <li>libLLVMBCReader.a</li>
212 <li>libLLVMCore.a</li>
213 <li>libLLVMSupport.a</li>
214 <li>libLLVMSystem.a</li>
215 </ul></dd>
216 <dt><b>libLLVMAsmParser.a</b</dt><dd><ul>
217 <li>libLLVMCore.a</li>
218 <li>libLLVMSupport.a</li>
219 <li>libLLVMSystem.a</li>
220 </ul></dd>
221 <dt><b>libLLVMBCReader.a</b</dt><dd><ul>
222 <li>libLLVMCore.a</li>
223 <li>libLLVMSupport.a</li>
224 <li>libLLVMSystem.a</li>
225 </ul></dd>
226 <dt><b>libLLVMBCWriter.a</b</dt><dd><ul>
227 <li>libLLVMCore.a</li>
228 <li>libLLVMSupport.a</li>
229 <li>libLLVMSystem.a</li>
230 </ul></dd>
231 <dt><b>libLLVMCodeGen.a</b</dt><dd><ul>
232 <li>libLLVMAnalysis.a</li>
233 <li>libLLVMCore.a</li>
234 <li>libLLVMSupport.a</li>
235 <li>libLLVMSystem.a</li>
236 <li>libLLVMTarget.a</li>
237 </ul></dd>
238 <dt><b>libLLVMCore.a</b</dt><dd><ul>
239 <li>libLLVMSupport.a</li>
240 <li>libLLVMSystem.a</li>
241 </ul></dd>
242 <dt><b>libLLVMDebugger.a</b</dt><dd><ul>
243 <li>libLLVMBCReader.a</li>
244 <li>libLLVMCore.a</li>
245 <li>libLLVMSupport.a</li>
246 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000247 </ul></dd>
248 <dt><b>libLLVMInstrumentation.a</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000249 <li>libLLVMCore.a</li>
Reid Spencerd42037a2006-05-13 02:22:01 +0000250 <li>libLLVMScalarOpts.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000251 <li>libLLVMSupport.a</li>
252 <li>libLLVMTransformUtils.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000253 </ul></dd>
254 <dt><b>libLLVMLinker.a</b</dt><dd><ul>
255 <li>libLLVMArchive.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000256 <li>libLLVMBCReader.a</li>
257 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000258 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000259 </ul></dd>
260 <dt><b>libLLVMScalarOpts.a</b</dt><dd><ul>
261 <li>libLLVMAnalysis.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000262 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000263 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000264 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000265 <li>libLLVMTarget.a</li>
266 <li>libLLVMTransformUtils.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000267 </ul></dd>
268 <dt><b>libLLVMSelectionDAG.a</b</dt><dd><ul>
269 <li>libLLVMCodeGen.a</li>
270 <li>libLLVMCore.a</li>
271 <li>libLLVMSupport.a</li>
272 <li>libLLVMSystem.a</li>
273 <li>libLLVMTarget.a</li>
274 <li>libLLVMTransformUtils.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000275 </ul></dd>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000276 <dt><b>libLLVMSupport.a</b</dt><dd><ul>
277 <li>libLLVMSystem.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000278 <li>libLLVMbzip2.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000279 </ul></dd>
Reid Spencerd42037a2006-05-13 02:22:01 +0000280 <dt><b>libLLVMSystem.a</b</dt><dd><ul>
281 </ul></dd>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000282 <dt><b>libLLVMTarget.a</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000283 <li>libLLVMCodeGen.a</li>
284 <li>libLLVMCore.a</li>
285 <li>libLLVMSelectionDAG.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000286 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000287 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000288 </ul></dd>
289 <dt><b>libLLVMTransformUtils.a</b</dt><dd><ul>
290 <li>libLLVMAnalysis.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000291 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000292 <li>libLLVMScalarOpts.a</li>
293 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000294 <li>libLLVMSystem.a</li>
295 <li>libLLVMipa.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000296 </ul></dd>
297 <dt><b>libLLVMTransforms.a</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000298 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000299 <li>libLLVMSupport.a</li>
300 <li>libLLVMTarget.a</li>
301 <li>libLLVMTransformUtils.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000302 </ul></dd>
303 <dt><b>libLLVMbzip2.a</b</dt><dd><ul>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000304 </ul></dd>
305 <dt><b>libLLVMipa.a</b</dt><dd><ul>
306 <li>libLLVMAnalysis.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000307 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000308 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000309 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000310 </ul></dd>
311 <dt><b>libLLVMipo.a</b</dt><dd><ul>
312 <li>libLLVMAnalysis.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000313 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000314 <li>libLLVMSupport.a</li>
315 <li>libLLVMSystem.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000316 <li>libLLVMTarget.a</li>
317 <li>libLLVMTransformUtils.a</li>
318 <li>libLLVMipa.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000319 </ul></dd>
Reid Spencere131ec92006-08-01 07:32:01 +0000320 <dt><b>LLVMARM.o</b</dt><dd><ul>
321 <li>libLLVMCodeGen.a</li>
322 <li>libLLVMCore.a</li>
323 <li>libLLVMScalarOpts.a</li>
324 <li>libLLVMSelectionDAG.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000325 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000326 <li>libLLVMSystem.a</li>
327 <li>libLLVMTarget.a</li>
328 </ul></dd>
329 <dt><b>LLVMAlpha.o</b</dt><dd><ul>
330 <li>libLLVMCodeGen.a</li>
331 <li>libLLVMCore.a</li>
332 <li>libLLVMScalarOpts.a</li>
333 <li>libLLVMSelectionDAG.a</li>
334 <li>libLLVMSupport.a</li>
335 <li>libLLVMSystem.a</li>
336 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000337 </ul></dd>
338 <dt><b>LLVMCBackend.o</b</dt><dd><ul>
339 <li>libLLVMAnalysis.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000340 <li>libLLVMCodeGen.a</li>
341 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000342 <li>libLLVMScalarOpts.a</li>
343 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000344 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000345 <li>libLLVMTarget.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000346 <li>libLLVMipa.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000347 </ul></dd>
348 <dt><b>LLVMDataStructure.o</b</dt><dd><ul>
349 <li>libLLVMAnalysis.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000350 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000351 <li>libLLVMSupport.a</li>
352 <li>libLLVMSystem.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000353 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000354 </ul></dd>
355 <dt><b>LLVMExecutionEngine.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000356 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000357 <li>libLLVMSupport.a</li>
358 <li>libLLVMSystem.a</li>
359 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000360 </ul></dd>
Reid Spencerd42037a2006-05-13 02:22:01 +0000361 <dt><b>LLVMIA64.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000362 <li>libLLVMCodeGen.a</li>
363 <li>libLLVMCore.a</li>
Reid Spencerd42037a2006-05-13 02:22:01 +0000364 <li>libLLVMScalarOpts.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000365 <li>libLLVMSelectionDAG.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000366 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000367 <li>libLLVMSystem.a</li>
Reid Spencerd42037a2006-05-13 02:22:01 +0000368 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000369 </ul></dd>
370 <dt><b>LLVMInterpreter.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000371 <li>LLVMExecutionEngine.o</li>
372 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000373 <li>libLLVMSupport.a</li>
374 <li>libLLVMSystem.a</li>
375 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000376 </ul></dd>
377 <dt><b>LLVMJIT.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000378 <li>LLVMExecutionEngine.o</li>
379 <li>libLLVMCodeGen.a</li>
380 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000381 <li>libLLVMSupport.a</li>
382 <li>libLLVMSystem.a</li>
383 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000384 </ul></dd>
385 <dt><b>LLVMPowerPC.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000386 <li>libLLVMCodeGen.a</li>
387 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000388 <li>libLLVMScalarOpts.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000389 <li>libLLVMSelectionDAG.a</li>
Reid Spencerd42037a2006-05-13 02:22:01 +0000390 <li>libLLVMSupport.a</li>
391 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000392 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000393 </ul></dd>
Chris Lattner029e8442006-02-05 06:40:12 +0000394 <dt><b>LLVMSparc.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000395 <li>libLLVMCodeGen.a</li>
396 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000397 <li>libLLVMScalarOpts.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000398 <li>libLLVMSelectionDAG.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000399 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000400 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000401 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000402 </ul></dd>
403 <dt><b>LLVMX86.o</b</dt><dd><ul>
Reid Spencere131ec92006-08-01 07:32:01 +0000404 <li>libLLVMCodeGen.a</li>
405 <li>libLLVMCore.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000406 <li>libLLVMScalarOpts.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000407 <li>libLLVMSelectionDAG.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000408 <li>libLLVMSupport.a</li>
Reid Spencere131ec92006-08-01 07:32:01 +0000409 <li>libLLVMSystem.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000410 <li>libLLVMTarget.a</li>
Reid Spencere0f33ae2004-12-30 23:12:04 +0000411 </ul></dd>
412</dl>
413</div>
414
415<!-- ======================================================================= -->
Chris Lattner61757352004-02-27 06:28:34 +0000416<div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div>
417<div class="doc_text">
418 <p>This section contains various "rules of thumb" about what files you
419 should link into your programs.</p>
420</div>
421<!-- ======================================================================= -->
Misha Brukman6fb51662004-11-08 00:22:22 +0000422<div class="doc_subsection"><a name="always">Always Link LLVMCore, LLVMSupport,
423 and LLVMSystem</a></div>
Chris Lattner61757352004-02-27 06:28:34 +0000424<div class="doc_text">
Reid Spencer52afa7e2004-11-08 00:26:32 +0000425 <p>No matter what you do with LLVM, the last three entries in the value of
426 your LLVMLIBS make variable should always be:
427 <tt>LLVMCore LLVMSupport.a LLVMSystem.a</tt>. There are no <tt>LLVM</tt>
428 programs that don't depend on these three.</p>
Chris Lattner61757352004-02-27 06:28:34 +0000429</div>
430<!-- ======================================================================= -->
Reid Spencer341d7142004-10-31 23:00:25 +0000431<div class="doc_subsection"><a name="onlyone">Never link both archive and
432 re-linked library</a></div>
Chris Lattner61757352004-02-27 06:28:34 +0000433<div class="doc_text">
Reid Spencer341d7142004-10-31 23:00:25 +0000434 <p>There is never any point to linking both the re-linked (<tt>.o</tt>) and
435 the archive (<tt>.a</tt>) versions of a library. Since the re-linked version
436 includes the entire library, the archive version will not resolve any symbols.
Reid Spencer347e2882004-11-08 00:24:43 +0000437 You could even end up with link error if you place the archive version before
Reid Spencer341d7142004-10-31 23:00:25 +0000438 the re-linked version on the linker's command line.</p>
Chris Lattner61757352004-02-27 06:28:34 +0000439</div>
440<!-- ======================================================================= -->
441<hr>
442<div class="doc_footer">
Reid Spencerbd722412004-11-01 09:19:53 +0000443<address>
444 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
445 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"/></a>
446 <a href="http://validator.w3.org/check/referer"><img
447 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
448 <a href="mailto:rspencer@x10sys.com">Reid Spencer</a>
449</address>
Reid Spencer05fe4b02006-03-14 05:39:39 +0000450<a href="http://llvm.org">The LLVM Compiler Infrastructure</a>
Chris Lattner61757352004-02-27 06:28:34 +0000451<br>Last modified: $Date$ </div>
452</body>
453</html>
454<!-- vim: sw=2 ts=2 ai
455-->