| Reid Spencer | cbadf80 | 2004-11-01 09:21:32 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 2 | <html> | 
 | 3 | <head> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 4 | 	<title>Using The LLVM Libraries</title> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 5 |   <link rel="stylesheet" href="llvm.css" type="text/css"> | 
 | 6 | </head> | 
 | 7 | <body> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 8 | <div class="doc_title">Using The LLVM Libraries</div> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 9 | <ol> | 
 | 10 |   <li><a href="#abstract">Abstract</a></li> | 
 | 11 |   <li><a href="#introduction">Introduction</a></li> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 12 |   <li><a href="#descriptions">Library Descriptions</a></li> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 13 |   <li><a href="#dependencies">Library Dependencies</a></li> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 14 |   <li><a href="#rot">Linkage Rules Of Thumb</a> | 
 | 15 | 	  <ol> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 16 |       <li><a href="#always">Always link LLVMCore, LLVMSupport, LLVMSystem</a> | 
 | 17 | 			<li><a href="#onlyone">Never link both archive and re-linked</a> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 18 | 		</ol> | 
 | 19 | 	</li> | 
 | 20 | </ol> | 
| Chris Lattner | 7911ce2 | 2004-05-23 21:07:27 +0000 | [diff] [blame] | 21 |  | 
 | 22 | <div class="doc_author"> | 
 | 23 |   <p>Written by <a href="mailto:rspencer@x10sys.com">Reid Spencer</a></p> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 24 | </div> | 
| Chris Lattner | 7911ce2 | 2004-05-23 21:07:27 +0000 | [diff] [blame] | 25 |  | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 26 | <!-- ======================================================================= --> | 
 | 27 | <div class="doc_section"><a name="abstract">Abstract</a></div> | 
 | 28 | <div class="doc_text"> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 29 |   <p>Amongst other things, LLVM is a toolkit for building compilers, linkers, | 
 | 30 |   runtime executives, virtual machines, and other program execution related | 
 | 31 |   tools. In addition to the LLVM tool set, the functionality of LLVM is | 
 | 32 |   available through a set of libraries.  To use LLVM as a toolkit for | 
 | 33 |   constructing tools, a developer needs to understand what is contained in the | 
 | 34 |   various libraries, what they depend on, and how to use them.  This document  | 
 | 35 |   describes the contents of the libraries and how and when to use them. | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 36 | </p> | 
 | 37 | </div> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 38 |  | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 39 | <!-- ======================================================================= --> | 
 | 40 | <div class="doc_section"> <a name="introduction">Introduction</a></div> | 
 | 41 | <div class="doc_text"> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 42 |   <p>If you're writing a compiler, virtual machine, or any other utility based  | 
 | 43 |   on LLVM, you'll need to figure out which of the many libraries files you will  | 
 | 44 |   need to link with to be successful. An understanding of the contents of these  | 
 | 45 |   files and their inter-relationships will be useful in coming up with an optimal  | 
 | 46 |   specification for the libraries to link with. The purpose of this document is  | 
 | 47 |   to reduce some of the trial and error that the author experienced in using  | 
 | 48 |   LLVM.</p> | 
 | 49 |   <p>LLVM produces two types of libraries: archives (ending in <tt>.a</tt>) and | 
 | 50 |   objects (ending in <tt>.o</tt>). However, both are libraries. Libraries ending | 
 | 51 |   in <tt>.o</tt> are known as re-linked libraries because they contain all the | 
 | 52 |   compilation units of the library linked together as a single <tt>.o</tt> file. | 
 | 53 |   Furthermore, many of the libraries have <em>both</em> forms of library. The | 
 | 54 |   re-linked libraries are used whenever you want to include all symbols from the | 
 | 55 |   library. The archive libraries are used whenever you want to only resolve | 
 | 56 |   outstanding symbols at that point in the link without including everything in | 
 | 57 |   the library. </p> | 
 | 58 |   <p>When linking your tools, you will use the <tt>LLVMLIBS</tt> make variable.  | 
 | 59 |   (see the <a href="MakefileGuide.html#LLVMLIBS">Makefile Guide</a> for  | 
 | 60 |   details). This variable specifies which LLVM libraries to link into your tool  | 
 | 61 |   and the order in which they will be linked. You specify re-linked libraries by | 
 | 62 |   naming the library without a suffix. You specify archive libraries by naming | 
 | 63 |   the library with a <tt>.a</tt> suffix but without the <tt>lib</tt> prefix. The | 
 | 64 |   order in which the libraries appear in the <tt>LLVMLIBS</tt> variable | 
 | 65 |   definition is the order in which they will be linked. Getting this order | 
 | 66 |   correct for your tool can sometimes be challenging. | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 67 | </div> | 
 | 68 | <!-- ======================================================================= --> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 69 | <div class="doc_section"><a name="descriptions"></a>Library Descriptions</div> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 70 | <div class="doc_text"> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 71 |   <p>The table below categorizes each library | 
 | 72 | <table style="text-align:left"> | 
 | 73 |   <tr><th>Library</th><th>Forms</th><th>Description</th></tr> | 
| Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 74 |   <tr><th colspan="3">Core Libraries</th></tr> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 75 |   <tr><td>LLVMArchive</td><td><tt>.a</tt></td> | 
 | 76 |     <td>LLVM archive reading and writing</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 77 |   <tr><td>LLVMAsmParser</td><td><tt>.o</tt></td> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 78 |     <td>LLVM assembly parsing</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 79 |   <tr><td>LLVMBCReader</td><td><tt>.o</tt></td> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 80 |     <td>LLVM bytecode reading</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 81 |   <tr><td>LLVMBCWriter</td><td><tt>.o</tt></td> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 82 |     <td>LLVM bytecode writing</td></tr> | 
 | 83 |   <tr><td>LLVMCore</td><td><tt>.o</tt></td> | 
 | 84 |     <td>LLVM core intermediate representation</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 85 |   <tr><td>LLVMDebugger</td><td><tt>.o</tt></td> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 86 |     <td>Source level debugging support</td></tr> | 
 | 87 |   <tr><td>LLVMLinker</td><td><tt>.a</tt></td> | 
 | 88 |     <td>Bytecode and archive linking interface</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 89 |   <tr><td>LLVMSupport</td><td><tt>.a .o</tt></td> | 
 | 90 |     <td>General support utilities</td></tr> | 
 | 91 |   <tr><td>LLVMSystem</td><td><tt>.a .o</tt></td> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 92 |     <td>Operating system abstraction layer</td></tr> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 93 |  | 
| Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 94 |   <tr><th colspan="3">Analysis Libraries</th></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 95 |   <tr><td>LLVMAnalysis</td><td><tt>.a .o</tt></td> | 
 | 96 |     <td>Various analysis passes.</td></tr> | 
 | 97 |   <tr><td>LLVMDataStructure</td><td><tt>.a .o</tt></td> | 
 | 98 |     <td>Data structure analysis passes.</td></tr> | 
 | 99 |   <tr><td>LLVMipa</td><td><tt>.a .o</tt></td> | 
 | 100 |     <td>Inter-procedural analysis passes.</td></tr> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 101 |  | 
| Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 102 |   <tr><th colspan="3">Transformation Libraries</th></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 103 |   <tr><td>LLVMInstrumentation</td><td><tt>.a .o</tt></td> | 
 | 104 |     <td>Instrumentation passes.</td></tr> | 
 | 105 |   <tr><td>LLVMipo</td><td><tt>.a .o</tt></td> | 
 | 106 |     <td>All inter-procedural optimization passes.</td></tr> | 
 | 107 |   <tr><td>LLVMScalarOpts</td><td><tt>.a .o</tt></td> | 
 | 108 |     <td>All scalar optimization passes.</td></tr> | 
 | 109 |   <tr><td>LLVMTransforms</td><td><tt>.a .o</tt></td> | 
 | 110 |     <td>Uncategorized transformation passes.</td></tr> | 
 | 111 |   <tr><td>LLVMTransformUtils</td><td><tt>.a .o</tt></td> | 
 | 112 |     <td>Transformation utilities.</td></tr> | 
 | 113 |   <tr><td>LLVMProfilePaths</td><td><tt>.o</tt></td> | 
 | 114 |     <td>Profile paths for instrumentation.</td></tr> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 115 |  | 
| Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 116 |   <tr><th colspan="3">Code Generation Libraries </th></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 117 |   <tr><td>LLVMCodeGen</td><td><tt>.o</tt></td> | 
 | 118 |     <td>Native code generation infrastructure</td></tr> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 119 |  | 
| Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 120 |   <tr><th colspan="3">Target Libraries</th></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 121 |   <tr><td>LLVMCBackend</td><td><tt>.o</tt></td> | 
 | 122 |     <td>'C' language code generator.</td></tr> | 
 | 123 |   <tr><td>LLVMPowerPC</td><td><tt>.o</tt></td> | 
 | 124 |     <td>PowerPC code generation backend</td></tr> | 
 | 125 |   <tr><td>LLVMSelectionDAG</td><td><tt>.o</tt></td> | 
| Reid Spencer | 139e166 | 2004-12-31 00:13:14 +0000 | [diff] [blame] | 126 |     <td>Aggressive instruction selector for directed acyclic graphs.</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 127 |   <tr><td>LLVMSkeleton</td><td><tt>.a .o</tt></td> | 
 | 128 |     <td>Skeleton for a code generation backend.</td></tr> | 
| Chris Lattner | 029e844 | 2006-02-05 06:40:12 +0000 | [diff] [blame] | 129 |   <tr><td>LLVMSparc</td><td><tt>.o</tt></td> | 
 | 130 |     <td>Code generation for Sparc.</td></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 131 |   <tr><td>LLVMSparcV9</td><td><tt>.o</tt></td> | 
 | 132 |     <td>Code generation for SparcV9.</td></tr> | 
 | 133 |   <tr><td>LLVMSparcV9RegAlloc</td><td><tt>.a .o</tt></td> | 
 | 134 |     <td>Graph-coloring register allocator for SparcV9.</td></tr> | 
 | 135 |   <tr><td>LLVMSparcV9InstrSched</td><td><tt>.o</tt></td> | 
 | 136 |     <td>Instruction scheduling for SparcV9.</td></tr> | 
 | 137 |   <tr><td>LLVMSparcV9LiveVar</td><td><tt>.o</tt></td> | 
 | 138 |     <td>Live variable analysis SparcV9.</td></tr> | 
 | 139 |   <tr><td>LLVMSparcV9ModuloSched</td><td><tt>.o</tt></td> | 
 | 140 |     <td>Modulo scheduling for SparcV9.</td></tr> | 
 | 141 |   <tr><td>LLVMTarget</td><td><tt>.a .o</tt></td> | 
 | 142 |     <td>Generic code generation utilities.</td></tr> | 
 | 143 |   <tr><td>LLVMX86</td><td><tt>.o</tt></td> | 
 | 144 |     <td>Intel x86 code generation backend</td></tr> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 145 |  | 
| Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 146 |   <tr><th colspan="3">Runtime Libraries</th></tr> | 
| Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 147 |   <tr><td>LLVMInterpreter</td><td><tt>.o</tt></td> | 
 | 148 |     <td>Bytecode Interpreter</td></tr> | 
 | 149 |   <tr><td>LLVMJIT</td><td><tt>.o</tt></td> | 
 | 150 |     <td>Bytecode JIT Compiler</td></tr> | 
 | 151 |   <tr><td>LLVMExecutionEngine</td><td><tt>.o</tt></td> | 
 | 152 |     <td>Virtual machine engine</td></tr> | 
 | 153 |   <tr><td>LLVMexecve</td><td><tt>.o</tt></td> | 
 | 154 |     <td>execve(2) replacement for llee</td></tr> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 155 | </table> | 
 | 156 | </div> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 157 |  | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 158 | <!-- ======================================================================= --> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 159 | <div class="doc_section"><a name="dependencies"></a>Library Dependencies</div> | 
 | 160 | <div class="doc_text"> | 
| Reid Spencer | 43ff900 | 2005-01-03 05:46:46 +0000 | [diff] [blame] | 161 |   <p>Below are two dependency graphs and a list that show the relationships | 
 | 162 |   between the various LLVM archive libraries and object files.  This information  | 
 | 163 |   can be automatically generated with the <tt>GenLibDeps.pl</tt> utility found | 
 | 164 |   in the <tt>llvm/utils</tt> directory.</p> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 165 |   <!-- =======NOTE: =========================================================--> | 
| Reid Spencer | 43ff900 | 2005-01-03 05:46:46 +0000 | [diff] [blame] | 166 |   <!-- === The following graphs and <dl> list are generated automatically ===--> | 
 | 167 |   <!-- === by the util named GenLibDeps.pl in the llvm/utils directory.   ===--> | 
 | 168 |   <!-- === This should be updated whenever new libraries are added,       ===--> | 
 | 169 |   <!-- === removed, or changed                                            ===--> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 170 |   <!-- =======NOTE: =========================================================--> | 
| Reid Spencer | 43ff900 | 2005-01-03 05:46:46 +0000 | [diff] [blame] | 171 |   <h2>Dependency Relationships Of Libraries</h2> | 
 | 172 |   <p>This graph shows the dependency of archive libraries on other archive  | 
 | 173 |   libraries or objects. Where a library has both archive and object forms, only | 
 | 174 |   the archive form is shown.</p> | 
 | 175 |   <img src="img/libdeps.gif" alt="Library Dependencies"/> | 
 | 176 |   <h2>Dependency Relationships Of Object Files</h2> | 
 | 177 |   <p>This graph shows the dependency of object files on archive libraries or  | 
 | 178 |   other objects. Where a library has both object and archive forms, only the  | 
 | 179 |   dependency to the archive form is shown.</p>  | 
 | 180 |   <img src="img/objdeps.gif" alt="Object File Dependencies"/> | 
 | 181 |   <p>The following list shows the dependency relationships between libraries in | 
 | 182 |   textual form. The information is the same as shown on the graphs but arranged | 
 | 183 |   alphabetically.</p> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 184 | <dl> | 
 | 185 |   <dt><b>libLLVMAnalysis.a</b</dt><dd><ul> | 
 | 186 |     <li>libLLVMScalarOpts.a</li> | 
 | 187 |     <li>libLLVMSupport.a</li> | 
 | 188 |     <li>libLLVMTarget.a</li> | 
 | 189 |     <li>libLLVMTransformUtils.a</li> | 
 | 190 |     <li>LLVMCore.o</li> | 
 | 191 |   </ul></dd> | 
 | 192 |   <dt><b>libLLVMArchive.a</b</dt><dd><ul> | 
 | 193 |     <li>libLLVMSupport.a</li> | 
 | 194 |     <li>libLLVMSystem.a</li> | 
 | 195 |     <li>LLVMBCReader.o</li> | 
 | 196 |   </ul></dd> | 
 | 197 |   <dt><b>libLLVMDataStructure.a</b</dt><dd><ul> | 
 | 198 |     <li>libLLVMAnalysis.a</li> | 
 | 199 |     <li>libLLVMSupport.a</li> | 
 | 200 |     <li>libLLVMTarget.a</li> | 
 | 201 |     <li>libLLVMTransformUtils.a</li> | 
 | 202 |     <li>LLVMCore.o</li> | 
 | 203 |   </ul></dd> | 
 | 204 |   <dt><b>libLLVMInstrumentation.a</b</dt><dd><ul> | 
 | 205 |     <li>libLLVMSupport.a</li> | 
 | 206 |     <li>libLLVMTransformUtils.a</li> | 
 | 207 |     <li>LLVMCore.o</li> | 
 | 208 |   </ul></dd> | 
 | 209 |   <dt><b>libLLVMLinker.a</b</dt><dd><ul> | 
 | 210 |     <li>libLLVMArchive.a</li> | 
 | 211 |     <li>libLLVMSystem.a</li> | 
 | 212 |     <li>LLVMBCReader.o</li> | 
 | 213 |     <li>LLVMCore.o</li> | 
 | 214 |   </ul></dd> | 
 | 215 |   <dt><b>libLLVMScalarOpts.a</b</dt><dd><ul> | 
 | 216 |     <li>libLLVMAnalysis.a</li> | 
 | 217 |     <li>libLLVMSupport.a</li> | 
 | 218 |     <li>libLLVMTarget.a</li> | 
 | 219 |     <li>libLLVMTransformUtils.a</li> | 
 | 220 |     <li>LLVMCore.o</li> | 
 | 221 |   </ul></dd> | 
 | 222 |   <dt><b>libLLVMSparcV9RegAlloc.a</b</dt><dd><ul> | 
 | 223 |     <li>libLLVMAnalysis.a</li> | 
 | 224 |     <li>libLLVMSupport.a</li> | 
 | 225 |     <li>LLVMCodeGen.o</li> | 
 | 226 |     <li>LLVMCore.o</li> | 
 | 227 |     <li>LLVMSparcV9LiveVar.o</li> | 
 | 228 |     <li>LLVMSparcV9.o</li> | 
 | 229 |   </ul></dd> | 
 | 230 |   <dt><b>libLLVMSupport.a</b</dt><dd><ul> | 
 | 231 |     <li>libLLVMSystem.a</li> | 
 | 232 |     <li>LLVMbzip2.o</li> | 
 | 233 |   </ul></dd> | 
| Reid Spencer | 43ff900 | 2005-01-03 05:46:46 +0000 | [diff] [blame] | 234 |   <dt><b>libLLVMSystem.a</b</dt><dd></dd> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 235 |   <dt><b>libLLVMTarget.a</b</dt><dd><ul> | 
 | 236 |     <li>libLLVMSupport.a</li> | 
 | 237 |     <li>LLVMCore.o</li> | 
 | 238 |   </ul></dd> | 
 | 239 |   <dt><b>libLLVMTransformUtils.a</b</dt><dd><ul> | 
 | 240 |     <li>libLLVMAnalysis.a</li> | 
 | 241 |     <li>libLLVMScalarOpts.a</li> | 
 | 242 |     <li>libLLVMSupport.a</li> | 
 | 243 |     <li>LLVMCore.o</li> | 
 | 244 |   </ul></dd> | 
 | 245 |   <dt><b>libLLVMTransforms.a</b</dt><dd><ul> | 
 | 246 |     <li>libLLVMAnalysis.a</li> | 
 | 247 |     <li>libLLVMSupport.a</li> | 
 | 248 |     <li>libLLVMTarget.a</li> | 
 | 249 |     <li>libLLVMTransformUtils.a</li> | 
 | 250 |     <li>LLVMCore.o</li> | 
 | 251 |   </ul></dd> | 
 | 252 |   <dt><b>libLLVMipa.a</b</dt><dd><ul> | 
 | 253 |     <li>libLLVMAnalysis.a</li> | 
 | 254 |     <li>libLLVMSupport.a</li> | 
 | 255 |     <li>LLVMCore.o</li> | 
 | 256 |   </ul></dd> | 
 | 257 |   <dt><b>libLLVMipo.a</b</dt><dd><ul> | 
 | 258 |     <li>libLLVMAnalysis.a</li> | 
 | 259 |     <li>libLLVMipa.a</li> | 
 | 260 |     <li>libLLVMScalarOpts.a</li> | 
 | 261 |     <li>libLLVMSupport.a</li> | 
 | 262 |     <li>libLLVMTarget.a</li> | 
 | 263 |     <li>libLLVMTransformUtils.a</li> | 
 | 264 |     <li>LLVMCore.o</li> | 
 | 265 |   </ul></dd> | 
 | 266 |   <dt><b>LLVMAnalysis.o</b</dt><dd><ul> | 
 | 267 |     <li>libLLVMScalarOpts.a</li> | 
 | 268 |     <li>libLLVMSupport.a</li> | 
 | 269 |     <li>libLLVMTarget.a</li> | 
 | 270 |     <li>libLLVMTransformUtils.a</li> | 
 | 271 |     <li>LLVMCore.o</li> | 
 | 272 |   </ul></dd> | 
 | 273 |   <dt><b>LLVMAsmParser.o</b</dt><dd><ul> | 
 | 274 |     <li>LLVMCore.o</li> | 
 | 275 |   </ul></dd> | 
 | 276 |   <dt><b>LLVMBCReader.o</b</dt><dd><ul> | 
 | 277 |     <li>libLLVMSupport.a</li> | 
 | 278 |     <li>libLLVMSystem.a</li> | 
 | 279 |     <li>LLVMCore.o</li> | 
 | 280 |   </ul></dd> | 
 | 281 |   <dt><b>LLVMBCWriter.o</b</dt><dd><ul> | 
 | 282 |     <li>libLLVMSupport.a</li> | 
 | 283 |     <li>LLVMCore.o</li> | 
 | 284 |   </ul></dd> | 
 | 285 |   <dt><b>LLVMCBackend.o</b</dt><dd><ul> | 
 | 286 |     <li>libLLVMAnalysis.a</li> | 
 | 287 |     <li>libLLVMipa.a</li> | 
 | 288 |     <li>libLLVMScalarOpts.a</li> | 
 | 289 |     <li>libLLVMSupport.a</li> | 
 | 290 |     <li>libLLVMTarget.a</li> | 
 | 291 |     <li>LLVMCore.o</li> | 
 | 292 |   </ul></dd> | 
 | 293 |   <dt><b>LLVMCodeGen.o</b</dt><dd><ul> | 
 | 294 |     <li>libLLVMAnalysis.a</li> | 
 | 295 |     <li>libLLVMSupport.a</li> | 
 | 296 |     <li>libLLVMTarget.a</li> | 
 | 297 |     <li>LLVMCore.o</li> | 
 | 298 |   </ul></dd> | 
 | 299 |   <dt><b>LLVMCore.o</b</dt><dd><ul> | 
 | 300 |     <li>libLLVMSupport.a</li> | 
 | 301 |   </ul></dd> | 
 | 302 |   <dt><b>LLVMDataStructure.o</b</dt><dd><ul> | 
 | 303 |     <li>libLLVMAnalysis.a</li> | 
 | 304 |     <li>libLLVMSupport.a</li> | 
 | 305 |     <li>libLLVMTarget.a</li> | 
 | 306 |     <li>libLLVMTransformUtils.a</li> | 
 | 307 |     <li>LLVMCore.o</li> | 
 | 308 |   </ul></dd> | 
 | 309 |   <dt><b>LLVMDebugger.o</b</dt><dd><ul> | 
 | 310 |     <li>libLLVMSupport.a</li> | 
 | 311 |     <li>libLLVMSystem.a</li> | 
 | 312 |     <li>LLVMBCReader.o</li> | 
 | 313 |     <li>LLVMCodeGen.o</li> | 
 | 314 |     <li>LLVMCore.o</li> | 
 | 315 |     <li>LLVMExecutionEngine.o</li> | 
 | 316 |   </ul></dd> | 
 | 317 |   <dt><b>LLVMExecutionEngine.o</b</dt><dd><ul> | 
 | 318 |     <li>libLLVMSupport.a</li> | 
 | 319 |     <li>libLLVMSystem.a</li> | 
 | 320 |     <li>libLLVMTarget.a</li> | 
 | 321 |     <li>LLVMCore.o</li> | 
 | 322 |     <li>LLVMInterpreter.o</li> | 
 | 323 |     <li>LLVMJIT.o</li> | 
 | 324 |   </ul></dd> | 
 | 325 |   <dt><b>LLVMInstrumentation.o</b</dt><dd><ul> | 
 | 326 |     <li>libLLVMSupport.a</li> | 
 | 327 |     <li>libLLVMTransformUtils.a</li> | 
 | 328 |     <li>LLVMCore.o</li> | 
 | 329 |   </ul></dd> | 
 | 330 |   <dt><b>LLVMInterpreter.o</b</dt><dd><ul> | 
 | 331 |     <li>libLLVMSupport.a</li> | 
 | 332 |     <li>libLLVMSystem.a</li> | 
 | 333 |     <li>libLLVMTarget.a</li> | 
 | 334 |     <li>LLVMCore.o</li> | 
 | 335 |     <li>LLVMExecutionEngine.o</li> | 
 | 336 |   </ul></dd> | 
 | 337 |   <dt><b>LLVMJIT.o</b</dt><dd><ul> | 
 | 338 |     <li>libLLVMSupport.a</li> | 
 | 339 |     <li>libLLVMSystem.a</li> | 
 | 340 |     <li>libLLVMTarget.a</li> | 
 | 341 |     <li>LLVMCore.o</li> | 
 | 342 |     <li>LLVMExecutionEngine.o</li> | 
 | 343 |   </ul></dd> | 
 | 344 |   <dt><b>LLVMPowerPC.o</b</dt><dd><ul> | 
 | 345 |     <li>libLLVMScalarOpts.a</li> | 
 | 346 |     <li>libLLVMSupport.a</li> | 
 | 347 |     <li>libLLVMTarget.a</li> | 
 | 348 |     <li>LLVMCodeGen.o</li> | 
 | 349 |     <li>LLVMCore.o</li> | 
 | 350 |   </ul></dd> | 
 | 351 |   <dt><b>LLVMProfilePaths.o</b</dt><dd><ul> | 
 | 352 |     <li>libLLVMInstrumentation.a</li> | 
 | 353 |     <li>libLLVMSupport.a</li> | 
 | 354 |     <li>LLVMCore.o</li> | 
 | 355 |   </ul></dd> | 
 | 356 |   <dt><b>LLVMScalarOpts.o</b</dt><dd><ul> | 
 | 357 |     <li>libLLVMAnalysis.a</li> | 
 | 358 |     <li>libLLVMSupport.a</li> | 
 | 359 |     <li>libLLVMTarget.a</li> | 
 | 360 |     <li>libLLVMTransformUtils.a</li> | 
 | 361 |     <li>LLVMCore.o</li> | 
 | 362 |   </ul></dd> | 
 | 363 |   <dt><b>LLVMSelectionDAG.o</b</dt><dd><ul> | 
 | 364 |     <li>LLVMCodeGen.o</li> | 
 | 365 |     <li>LLVMCore.o</li> | 
 | 366 |   </ul></dd> | 
 | 367 |   <dt><b>LLVMSkeleton.o</b</dt><dd><ul> | 
 | 368 |     <li>libLLVMTarget.a</li> | 
 | 369 |     <li>LLVMCodeGen.o</li> | 
 | 370 |     <li>LLVMCore.o</li> | 
 | 371 |   </ul></dd> | 
| Chris Lattner | 029e844 | 2006-02-05 06:40:12 +0000 | [diff] [blame] | 372 |   <dt><b>LLVMSparc.o</b</dt><dd><ul> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 373 |     <li>libLLVMScalarOpts.a</li> | 
 | 374 |     <li>libLLVMSupport.a</li> | 
 | 375 |     <li>libLLVMTarget.a</li> | 
 | 376 |     <li>LLVMCodeGen.o</li> | 
 | 377 |     <li>LLVMCore.o</li> | 
 | 378 |   </ul></dd> | 
 | 379 |   <dt><b>LLVMSparcV9.o</b</dt><dd><ul> | 
 | 380 |     <li>libLLVMScalarOpts.a</li> | 
 | 381 |     <li>libLLVMSparcV9RegAlloc.a</li> | 
 | 382 |     <li>libLLVMSupport.a</li> | 
 | 383 |     <li>libLLVMTarget.a</li> | 
 | 384 |     <li>LLVMBCWriter.o</li> | 
 | 385 |     <li>LLVMCodeGen.o</li> | 
 | 386 |     <li>LLVMCore.o</li> | 
 | 387 |     <li>LLVMSparcV9InstrSched.o</li> | 
 | 388 |     <li>LLVMSparcV9ModuloSched.o</li> | 
 | 389 |   </ul></dd> | 
 | 390 |   <dt><b>LLVMSparcV9InstrSched.o</b</dt><dd><ul> | 
 | 391 |     <li>libLLVMSupport.a</li> | 
 | 392 |     <li>LLVMCodeGen.o</li> | 
 | 393 |     <li>LLVMCore.o</li> | 
 | 394 |     <li>LLVMSparcV9LiveVar.o</li> | 
 | 395 |     <li>LLVMSparcV9.o</li> | 
 | 396 |   </ul></dd> | 
 | 397 |   <dt><b>LLVMSparcV9LiveVar.o</b</dt><dd><ul> | 
 | 398 |     <li>libLLVMSupport.a</li> | 
 | 399 |     <li>LLVMCodeGen.o</li> | 
 | 400 |     <li>LLVMCore.o</li> | 
 | 401 |   </ul></dd> | 
 | 402 |   <dt><b>LLVMSparcV9ModuloSched.o</b</dt><dd><ul> | 
 | 403 |     <li>libLLVMSupport.a</li> | 
 | 404 |     <li>libLLVMTarget.a</li> | 
 | 405 |     <li>LLVMCodeGen.o</li> | 
 | 406 |     <li>LLVMCore.o</li> | 
 | 407 |     <li>LLVMSparcV9.o</li> | 
 | 408 |   </ul></dd> | 
 | 409 |   <dt><b>LLVMSparcV9RegAlloc.o</b</dt><dd><ul> | 
 | 410 |     <li>libLLVMAnalysis.a</li> | 
 | 411 |     <li>libLLVMSupport.a</li> | 
 | 412 |     <li>LLVMCodeGen.o</li> | 
 | 413 |     <li>LLVMCore.o</li> | 
 | 414 |     <li>LLVMSparcV9LiveVar.o</li> | 
 | 415 |     <li>LLVMSparcV9.o</li> | 
 | 416 |   </ul></dd> | 
 | 417 |   <dt><b>LLVMSupport.o</b</dt><dd><ul> | 
 | 418 |     <li>libLLVMSystem.a</li> | 
 | 419 |     <li>LLVMbzip2.o</li> | 
 | 420 |   </ul></dd> | 
| Reid Spencer | 43ff900 | 2005-01-03 05:46:46 +0000 | [diff] [blame] | 421 |   <dt><b>LLVMSystem.o</b</dt><dd></dd> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 422 |   <dt><b>LLVMTarget.o</b</dt><dd><ul> | 
 | 423 |     <li>libLLVMSupport.a</li> | 
 | 424 |     <li>LLVMCore.o</li> | 
 | 425 |   </ul></dd> | 
 | 426 |   <dt><b>LLVMTransformUtils.o</b</dt><dd><ul> | 
 | 427 |     <li>libLLVMAnalysis.a</li> | 
 | 428 |     <li>libLLVMScalarOpts.a</li> | 
 | 429 |     <li>libLLVMSupport.a</li> | 
 | 430 |     <li>LLVMCore.o</li> | 
 | 431 |   </ul></dd> | 
 | 432 |   <dt><b>LLVMTransforms.o</b</dt><dd><ul> | 
 | 433 |     <li>libLLVMAnalysis.a</li> | 
 | 434 |     <li>libLLVMSupport.a</li> | 
 | 435 |     <li>libLLVMTarget.a</li> | 
 | 436 |     <li>libLLVMTransformUtils.a</li> | 
 | 437 |     <li>LLVMCore.o</li> | 
 | 438 |   </ul></dd> | 
 | 439 |   <dt><b>LLVMX86.o</b</dt><dd><ul> | 
 | 440 |     <li>libLLVMScalarOpts.a</li> | 
 | 441 |     <li>libLLVMSupport.a</li> | 
 | 442 |     <li>libLLVMTarget.a</li> | 
 | 443 |     <li>LLVMCodeGen.o</li> | 
 | 444 |     <li>LLVMCore.o</li> | 
 | 445 |   </ul></dd> | 
| Reid Spencer | 43ff900 | 2005-01-03 05:46:46 +0000 | [diff] [blame] | 446 |   <dt><b>LLVMbzip2.o</b</dt><dd></dd> | 
| Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame] | 447 |   <dt><b>LLVMipa.o</b</dt><dd><ul> | 
 | 448 |     <li>libLLVMAnalysis.a</li> | 
 | 449 |     <li>libLLVMSupport.a</li> | 
 | 450 |     <li>LLVMCore.o</li> | 
 | 451 |   </ul></dd> | 
 | 452 |   <dt><b>LLVMipo.o</b</dt><dd><ul> | 
 | 453 |     <li>libLLVMAnalysis.a</li> | 
 | 454 |     <li>libLLVMipa.a</li> | 
 | 455 |     <li>libLLVMScalarOpts.a</li> | 
 | 456 |     <li>libLLVMSupport.a</li> | 
 | 457 |     <li>libLLVMTarget.a</li> | 
 | 458 |     <li>libLLVMTransformUtils.a</li> | 
 | 459 |     <li>LLVMCore.o</li> | 
 | 460 |   </ul></dd> | 
 | 461 | </dl> | 
 | 462 | </div> | 
 | 463 |  | 
 | 464 | <!-- ======================================================================= --> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 465 | <div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div> | 
 | 466 | <div class="doc_text"> | 
 | 467 | 	<p>This section contains various "rules of thumb" about what files you | 
 | 468 | 	should link into your programs.</p> | 
 | 469 | </div> | 
 | 470 | <!-- ======================================================================= --> | 
| Misha Brukman | 6fb5166 | 2004-11-08 00:22:22 +0000 | [diff] [blame] | 471 | <div class="doc_subsection"><a name="always">Always Link LLVMCore, LLVMSupport, | 
 | 472 |     and LLVMSystem</a></div> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 473 | <div class="doc_text"> | 
| Reid Spencer | 52afa7e | 2004-11-08 00:26:32 +0000 | [diff] [blame] | 474 |   <p>No matter what you do with LLVM, the last three entries in the value of  | 
 | 475 |   your LLVMLIBS make variable should always be:  | 
 | 476 |   <tt>LLVMCore LLVMSupport.a LLVMSystem.a</tt>. There are no <tt>LLVM</tt>  | 
 | 477 |   programs that don't depend on these three.</p> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 478 | </div> | 
 | 479 | <!-- ======================================================================= --> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 480 | <div class="doc_subsection"><a name="onlyone">Never link both archive and | 
 | 481 |     re-linked library</a></div> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 482 | <div class="doc_text"> | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 483 |   <p>There is never any point to linking both the re-linked (<tt>.o</tt>) and | 
 | 484 |   the archive (<tt>.a</tt>) versions of a library. Since the re-linked version | 
 | 485 |   includes the entire library, the archive version will not resolve any symbols. | 
| Reid Spencer | 347e288 | 2004-11-08 00:24:43 +0000 | [diff] [blame] | 486 |   You could even end up with link error if you place the archive version before | 
| Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 487 |   the re-linked version on the linker's command line.</p> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 488 | </div> | 
 | 489 | <!-- ======================================================================= --> | 
 | 490 | <hr> | 
 | 491 | <div class="doc_footer"> | 
| Reid Spencer | bd72241 | 2004-11-01 09:19:53 +0000 | [diff] [blame] | 492 | <address> | 
 | 493 |   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img | 
 | 494 |     src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"/></a> | 
 | 495 |   <a href="http://validator.w3.org/check/referer"><img | 
 | 496 |     src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a> | 
 | 497 |   <a href="mailto:rspencer@x10sys.com">Reid Spencer</a> | 
 | 498 | </address> | 
| Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 499 | <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>  | 
 | 500 | <br>Last modified: $Date$ </div> | 
 | 501 | </body> | 
 | 502 | </html> | 
 | 503 | <!-- vim: sw=2 ts=2 ai | 
 | 504 | --> |