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 | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 75 | <tr><td>LLVMAsmParser</td><td><tt>.o</tt></td> |
| 76 | <td>LLVM Assembly Parsing</td></tr> |
| 77 | <tr><td>LLVMBCReader</td><td><tt>.o</tt></td> |
| 78 | <td>LLVM Bytecode Reading</td></tr> |
| 79 | <tr><td>LLVMBCWriter</td><td><tt>.o</tt></td> |
| 80 | <td>LLVM Bytecode Writing</td></tr> |
| 81 | <tr><td>LLVMDebugger</td><td><tt>.o</tt></td> |
| 82 | <td>Source Level Debugging Support</td></tr> |
| 83 | <tr><td>LLVMSupport</td><td><tt>.a .o</tt></td> |
| 84 | <td>General support utilities</td></tr> |
| 85 | <tr><td>LLVMSystem</td><td><tt>.a .o</tt></td> |
| 86 | <td>Operating system abstraction</td></tr> |
| 87 | <tr><td>LLVMCore</td><td><tt>.o</tt></td> |
| 88 | <td>LLVM Core IR</td></tr> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 89 | |
Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 90 | <tr><th colspan="3">Analysis Libraries</th></tr> |
Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 91 | <tr><td>LLVMAnalysis</td><td><tt>.a .o</tt></td> |
| 92 | <td>Various analysis passes.</td></tr> |
| 93 | <tr><td>LLVMDataStructure</td><td><tt>.a .o</tt></td> |
| 94 | <td>Data structure analysis passes.</td></tr> |
| 95 | <tr><td>LLVMipa</td><td><tt>.a .o</tt></td> |
| 96 | <td>Inter-procedural analysis passes.</td></tr> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 97 | |
Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 98 | <tr><th colspan="3">Transformation Libraries</th></tr> |
Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 99 | <tr><td>LLVMInstrumentation</td><td><tt>.a .o</tt></td> |
| 100 | <td>Instrumentation passes.</td></tr> |
| 101 | <tr><td>LLVMipo</td><td><tt>.a .o</tt></td> |
| 102 | <td>All inter-procedural optimization passes.</td></tr> |
| 103 | <tr><td>LLVMScalarOpts</td><td><tt>.a .o</tt></td> |
| 104 | <td>All scalar optimization passes.</td></tr> |
| 105 | <tr><td>LLVMTransforms</td><td><tt>.a .o</tt></td> |
| 106 | <td>Uncategorized transformation passes.</td></tr> |
| 107 | <tr><td>LLVMTransformUtils</td><td><tt>.a .o</tt></td> |
| 108 | <td>Transformation utilities.</td></tr> |
| 109 | <tr><td>LLVMProfilePaths</td><td><tt>.o</tt></td> |
| 110 | <td>Profile paths for instrumentation.</td></tr> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 111 | |
Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 112 | <tr><th colspan="3">Code Generation Libraries </th></tr> |
Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 113 | <tr><td>LLVMCodeGen</td><td><tt>.o</tt></td> |
| 114 | <td>Native code generation infrastructure</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">Target Libraries</th></tr> |
Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 117 | <tr><td>LLVMCBackend</td><td><tt>.o</tt></td> |
| 118 | <td>'C' language code generator.</td></tr> |
| 119 | <tr><td>LLVMPowerPC</td><td><tt>.o</tt></td> |
| 120 | <td>PowerPC code generation backend</td></tr> |
| 121 | <tr><td>LLVMSelectionDAG</td><td><tt>.o</tt></td> |
| 122 | <td>Aggressive instruction selector for Directed Acyclic Graphs.</td></tr> |
| 123 | <tr><td>LLVMSkeleton</td><td><tt>.a .o</tt></td> |
| 124 | <td>Skeleton for a code generation backend.</td></tr> |
| 125 | <tr><td>LLVMSparcV9</td><td><tt>.o</tt></td> |
| 126 | <td>Code generation for SparcV9.</td></tr> |
| 127 | <tr><td>LLVMSparcV9RegAlloc</td><td><tt>.a .o</tt></td> |
| 128 | <td>Graph-coloring register allocator for SparcV9.</td></tr> |
| 129 | <tr><td>LLVMSparcV9InstrSched</td><td><tt>.o</tt></td> |
| 130 | <td>Instruction scheduling for SparcV9.</td></tr> |
| 131 | <tr><td>LLVMSparcV9LiveVar</td><td><tt>.o</tt></td> |
| 132 | <td>Live variable analysis SparcV9.</td></tr> |
| 133 | <tr><td>LLVMSparcV9ModuloSched</td><td><tt>.o</tt></td> |
| 134 | <td>Modulo scheduling for SparcV9.</td></tr> |
| 135 | <tr><td>LLVMTarget</td><td><tt>.a .o</tt></td> |
| 136 | <td>Generic code generation utilities.</td></tr> |
| 137 | <tr><td>LLVMX86</td><td><tt>.o</tt></td> |
| 138 | <td>Intel x86 code generation backend</td></tr> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 139 | |
Reid Spencer | 0a4e8b3 | 2004-11-01 09:22:49 +0000 | [diff] [blame] | 140 | <tr><th colspan="3">Runtime Libraries</th></tr> |
Reid Spencer | 4148266 | 2004-10-31 23:24:31 +0000 | [diff] [blame] | 141 | <tr><td>LLVMInterpreter</td><td><tt>.o</tt></td> |
| 142 | <td>Bytecode Interpreter</td></tr> |
| 143 | <tr><td>LLVMJIT</td><td><tt>.o</tt></td> |
| 144 | <td>Bytecode JIT Compiler</td></tr> |
| 145 | <tr><td>LLVMExecutionEngine</td><td><tt>.o</tt></td> |
| 146 | <td>Virtual machine engine</td></tr> |
| 147 | <tr><td>LLVMexecve</td><td><tt>.o</tt></td> |
| 148 | <td>execve(2) replacement for llee</td></tr> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 149 | </table> |
| 150 | </div> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 151 | |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 152 | <!-- ======================================================================= --> |
Reid Spencer | e0f33ae | 2004-12-30 23:12:04 +0000 | [diff] [blame^] | 153 | <div class="doc_section"><a name="dependencies"></a>Library Dependencies</div> |
| 154 | <div class="doc_text"> |
| 155 | <p>The following list shows the dependency relationships between libraries. |
| 156 | This information can be automatically generated with the |
| 157 | <tt>GenLibDeps.pl</tt> utility in the <tt>llvm/utils</tt> directory.</p> |
| 158 | <!-- =======NOTE: =========================================================--> |
| 159 | <!-- === The following <dl> list is generated automatically by the util ===--> |
| 160 | <!-- === named GenLibDeps.pl in the llvm/utils directory. This should ===--> |
| 161 | <!-- === updated whenever new libraries are added, removed, or changed ===--> |
| 162 | <!-- =======NOTE: =========================================================--> |
| 163 | <dl> |
| 164 | <dt><b>libLLVMAnalysis.a</b</dt><dd><ul> |
| 165 | <li>libLLVMScalarOpts.a</li> |
| 166 | <li>libLLVMSupport.a</li> |
| 167 | <li>libLLVMTarget.a</li> |
| 168 | <li>libLLVMTransformUtils.a</li> |
| 169 | <li>LLVMCore.o</li> |
| 170 | </ul></dd> |
| 171 | <dt><b>libLLVMArchive.a</b</dt><dd><ul> |
| 172 | <li>libLLVMSupport.a</li> |
| 173 | <li>libLLVMSystem.a</li> |
| 174 | <li>LLVMBCReader.o</li> |
| 175 | </ul></dd> |
| 176 | <dt><b>libLLVMDataStructure.a</b</dt><dd><ul> |
| 177 | <li>libLLVMAnalysis.a</li> |
| 178 | <li>libLLVMSupport.a</li> |
| 179 | <li>libLLVMTarget.a</li> |
| 180 | <li>libLLVMTransformUtils.a</li> |
| 181 | <li>LLVMCore.o</li> |
| 182 | </ul></dd> |
| 183 | <dt><b>libLLVMInstrumentation.a</b</dt><dd><ul> |
| 184 | <li>libLLVMSupport.a</li> |
| 185 | <li>libLLVMTransformUtils.a</li> |
| 186 | <li>LLVMCore.o</li> |
| 187 | </ul></dd> |
| 188 | <dt><b>libLLVMLinker.a</b</dt><dd><ul> |
| 189 | <li>libLLVMArchive.a</li> |
| 190 | <li>libLLVMSystem.a</li> |
| 191 | <li>LLVMBCReader.o</li> |
| 192 | <li>LLVMCore.o</li> |
| 193 | </ul></dd> |
| 194 | <dt><b>libLLVMScalarOpts.a</b</dt><dd><ul> |
| 195 | <li>libLLVMAnalysis.a</li> |
| 196 | <li>libLLVMSupport.a</li> |
| 197 | <li>libLLVMTarget.a</li> |
| 198 | <li>libLLVMTransformUtils.a</li> |
| 199 | <li>LLVMCore.o</li> |
| 200 | </ul></dd> |
| 201 | <dt><b>libLLVMSparcV9RegAlloc.a</b</dt><dd><ul> |
| 202 | <li>libLLVMAnalysis.a</li> |
| 203 | <li>libLLVMSupport.a</li> |
| 204 | <li>LLVMCodeGen.o</li> |
| 205 | <li>LLVMCore.o</li> |
| 206 | <li>LLVMSparcV9LiveVar.o</li> |
| 207 | <li>LLVMSparcV9.o</li> |
| 208 | </ul></dd> |
| 209 | <dt><b>libLLVMSupport.a</b</dt><dd><ul> |
| 210 | <li>libLLVMSystem.a</li> |
| 211 | <li>LLVMbzip2.o</li> |
| 212 | </ul></dd> |
| 213 | <dt><b>libLLVMSystem.a</b</dt><dd><ul> |
| 214 | </ul></dd> |
| 215 | <dt><b>libLLVMTarget.a</b</dt><dd><ul> |
| 216 | <li>libLLVMSupport.a</li> |
| 217 | <li>LLVMCore.o</li> |
| 218 | </ul></dd> |
| 219 | <dt><b>libLLVMTransformUtils.a</b</dt><dd><ul> |
| 220 | <li>libLLVMAnalysis.a</li> |
| 221 | <li>libLLVMScalarOpts.a</li> |
| 222 | <li>libLLVMSupport.a</li> |
| 223 | <li>LLVMCore.o</li> |
| 224 | </ul></dd> |
| 225 | <dt><b>libLLVMTransforms.a</b</dt><dd><ul> |
| 226 | <li>libLLVMAnalysis.a</li> |
| 227 | <li>libLLVMSupport.a</li> |
| 228 | <li>libLLVMTarget.a</li> |
| 229 | <li>libLLVMTransformUtils.a</li> |
| 230 | <li>LLVMCore.o</li> |
| 231 | </ul></dd> |
| 232 | <dt><b>libLLVMipa.a</b</dt><dd><ul> |
| 233 | <li>libLLVMAnalysis.a</li> |
| 234 | <li>libLLVMSupport.a</li> |
| 235 | <li>LLVMCore.o</li> |
| 236 | </ul></dd> |
| 237 | <dt><b>libLLVMipo.a</b</dt><dd><ul> |
| 238 | <li>libLLVMAnalysis.a</li> |
| 239 | <li>libLLVMipa.a</li> |
| 240 | <li>libLLVMScalarOpts.a</li> |
| 241 | <li>libLLVMSupport.a</li> |
| 242 | <li>libLLVMTarget.a</li> |
| 243 | <li>libLLVMTransformUtils.a</li> |
| 244 | <li>LLVMCore.o</li> |
| 245 | </ul></dd> |
| 246 | <dt><b>LLVMAnalysis.o</b</dt><dd><ul> |
| 247 | <li>libLLVMScalarOpts.a</li> |
| 248 | <li>libLLVMSupport.a</li> |
| 249 | <li>libLLVMTarget.a</li> |
| 250 | <li>libLLVMTransformUtils.a</li> |
| 251 | <li>LLVMCore.o</li> |
| 252 | </ul></dd> |
| 253 | <dt><b>LLVMAsmParser.o</b</dt><dd><ul> |
| 254 | <li>LLVMCore.o</li> |
| 255 | </ul></dd> |
| 256 | <dt><b>LLVMBCReader.o</b</dt><dd><ul> |
| 257 | <li>libLLVMSupport.a</li> |
| 258 | <li>libLLVMSystem.a</li> |
| 259 | <li>LLVMCore.o</li> |
| 260 | </ul></dd> |
| 261 | <dt><b>LLVMBCWriter.o</b</dt><dd><ul> |
| 262 | <li>libLLVMSupport.a</li> |
| 263 | <li>LLVMCore.o</li> |
| 264 | </ul></dd> |
| 265 | <dt><b>LLVMCBackend.o</b</dt><dd><ul> |
| 266 | <li>libLLVMAnalysis.a</li> |
| 267 | <li>libLLVMipa.a</li> |
| 268 | <li>libLLVMScalarOpts.a</li> |
| 269 | <li>libLLVMSupport.a</li> |
| 270 | <li>libLLVMTarget.a</li> |
| 271 | <li>LLVMCore.o</li> |
| 272 | </ul></dd> |
| 273 | <dt><b>LLVMCodeGen.o</b</dt><dd><ul> |
| 274 | <li>libLLVMAnalysis.a</li> |
| 275 | <li>libLLVMSupport.a</li> |
| 276 | <li>libLLVMTarget.a</li> |
| 277 | <li>LLVMCore.o</li> |
| 278 | </ul></dd> |
| 279 | <dt><b>LLVMCore.o</b</dt><dd><ul> |
| 280 | <li>libLLVMSupport.a</li> |
| 281 | </ul></dd> |
| 282 | <dt><b>LLVMDataStructure.o</b</dt><dd><ul> |
| 283 | <li>libLLVMAnalysis.a</li> |
| 284 | <li>libLLVMSupport.a</li> |
| 285 | <li>libLLVMTarget.a</li> |
| 286 | <li>libLLVMTransformUtils.a</li> |
| 287 | <li>LLVMCore.o</li> |
| 288 | </ul></dd> |
| 289 | <dt><b>LLVMDebugger.o</b</dt><dd><ul> |
| 290 | <li>libLLVMSupport.a</li> |
| 291 | <li>libLLVMSystem.a</li> |
| 292 | <li>LLVMBCReader.o</li> |
| 293 | <li>LLVMCodeGen.o</li> |
| 294 | <li>LLVMCore.o</li> |
| 295 | <li>LLVMExecutionEngine.o</li> |
| 296 | </ul></dd> |
| 297 | <dt><b>LLVMExecutionEngine.o</b</dt><dd><ul> |
| 298 | <li>libLLVMSupport.a</li> |
| 299 | <li>libLLVMSystem.a</li> |
| 300 | <li>libLLVMTarget.a</li> |
| 301 | <li>LLVMCore.o</li> |
| 302 | <li>LLVMInterpreter.o</li> |
| 303 | <li>LLVMJIT.o</li> |
| 304 | </ul></dd> |
| 305 | <dt><b>LLVMInstrumentation.o</b</dt><dd><ul> |
| 306 | <li>libLLVMSupport.a</li> |
| 307 | <li>libLLVMTransformUtils.a</li> |
| 308 | <li>LLVMCore.o</li> |
| 309 | </ul></dd> |
| 310 | <dt><b>LLVMInterpreter.o</b</dt><dd><ul> |
| 311 | <li>libLLVMSupport.a</li> |
| 312 | <li>libLLVMSystem.a</li> |
| 313 | <li>libLLVMTarget.a</li> |
| 314 | <li>LLVMCore.o</li> |
| 315 | <li>LLVMExecutionEngine.o</li> |
| 316 | </ul></dd> |
| 317 | <dt><b>LLVMJIT.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>LLVMExecutionEngine.o</li> |
| 323 | </ul></dd> |
| 324 | <dt><b>LLVMPowerPC.o</b</dt><dd><ul> |
| 325 | <li>libLLVMScalarOpts.a</li> |
| 326 | <li>libLLVMSupport.a</li> |
| 327 | <li>libLLVMTarget.a</li> |
| 328 | <li>LLVMCodeGen.o</li> |
| 329 | <li>LLVMCore.o</li> |
| 330 | </ul></dd> |
| 331 | <dt><b>LLVMProfilePaths.o</b</dt><dd><ul> |
| 332 | <li>libLLVMInstrumentation.a</li> |
| 333 | <li>libLLVMSupport.a</li> |
| 334 | <li>LLVMCore.o</li> |
| 335 | </ul></dd> |
| 336 | <dt><b>LLVMScalarOpts.o</b</dt><dd><ul> |
| 337 | <li>libLLVMAnalysis.a</li> |
| 338 | <li>libLLVMSupport.a</li> |
| 339 | <li>libLLVMTarget.a</li> |
| 340 | <li>libLLVMTransformUtils.a</li> |
| 341 | <li>LLVMCore.o</li> |
| 342 | </ul></dd> |
| 343 | <dt><b>LLVMSelectionDAG.o</b</dt><dd><ul> |
| 344 | <li>LLVMCodeGen.o</li> |
| 345 | <li>LLVMCore.o</li> |
| 346 | </ul></dd> |
| 347 | <dt><b>LLVMSkeleton.o</b</dt><dd><ul> |
| 348 | <li>libLLVMTarget.a</li> |
| 349 | <li>LLVMCodeGen.o</li> |
| 350 | <li>LLVMCore.o</li> |
| 351 | </ul></dd> |
| 352 | <dt><b>LLVMSparcV8.o</b</dt><dd><ul> |
| 353 | <li>libLLVMScalarOpts.a</li> |
| 354 | <li>libLLVMSupport.a</li> |
| 355 | <li>libLLVMTarget.a</li> |
| 356 | <li>LLVMCodeGen.o</li> |
| 357 | <li>LLVMCore.o</li> |
| 358 | </ul></dd> |
| 359 | <dt><b>LLVMSparcV9.o</b</dt><dd><ul> |
| 360 | <li>libLLVMScalarOpts.a</li> |
| 361 | <li>libLLVMSparcV9RegAlloc.a</li> |
| 362 | <li>libLLVMSupport.a</li> |
| 363 | <li>libLLVMTarget.a</li> |
| 364 | <li>LLVMBCWriter.o</li> |
| 365 | <li>LLVMCodeGen.o</li> |
| 366 | <li>LLVMCore.o</li> |
| 367 | <li>LLVMSparcV9InstrSched.o</li> |
| 368 | <li>LLVMSparcV9ModuloSched.o</li> |
| 369 | </ul></dd> |
| 370 | <dt><b>LLVMSparcV9InstrSched.o</b</dt><dd><ul> |
| 371 | <li>libLLVMSupport.a</li> |
| 372 | <li>LLVMCodeGen.o</li> |
| 373 | <li>LLVMCore.o</li> |
| 374 | <li>LLVMSparcV9LiveVar.o</li> |
| 375 | <li>LLVMSparcV9.o</li> |
| 376 | </ul></dd> |
| 377 | <dt><b>LLVMSparcV9LiveVar.o</b</dt><dd><ul> |
| 378 | <li>libLLVMSupport.a</li> |
| 379 | <li>LLVMCodeGen.o</li> |
| 380 | <li>LLVMCore.o</li> |
| 381 | </ul></dd> |
| 382 | <dt><b>LLVMSparcV9ModuloSched.o</b</dt><dd><ul> |
| 383 | <li>libLLVMSupport.a</li> |
| 384 | <li>libLLVMTarget.a</li> |
| 385 | <li>LLVMCodeGen.o</li> |
| 386 | <li>LLVMCore.o</li> |
| 387 | <li>LLVMSparcV9.o</li> |
| 388 | </ul></dd> |
| 389 | <dt><b>LLVMSparcV9RegAlloc.o</b</dt><dd><ul> |
| 390 | <li>libLLVMAnalysis.a</li> |
| 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>LLVMSupport.o</b</dt><dd><ul> |
| 398 | <li>libLLVMSystem.a</li> |
| 399 | <li>LLVMbzip2.o</li> |
| 400 | </ul></dd> |
| 401 | <dt><b>LLVMSystem.o</b</dt><dd><ul> |
| 402 | </ul></dd> |
| 403 | <dt><b>LLVMTarget.o</b</dt><dd><ul> |
| 404 | <li>libLLVMSupport.a</li> |
| 405 | <li>LLVMCore.o</li> |
| 406 | </ul></dd> |
| 407 | <dt><b>LLVMTransformUtils.o</b</dt><dd><ul> |
| 408 | <li>libLLVMAnalysis.a</li> |
| 409 | <li>libLLVMScalarOpts.a</li> |
| 410 | <li>libLLVMSupport.a</li> |
| 411 | <li>LLVMCore.o</li> |
| 412 | </ul></dd> |
| 413 | <dt><b>LLVMTransforms.o</b</dt><dd><ul> |
| 414 | <li>libLLVMAnalysis.a</li> |
| 415 | <li>libLLVMSupport.a</li> |
| 416 | <li>libLLVMTarget.a</li> |
| 417 | <li>libLLVMTransformUtils.a</li> |
| 418 | <li>LLVMCore.o</li> |
| 419 | </ul></dd> |
| 420 | <dt><b>LLVMX86.o</b</dt><dd><ul> |
| 421 | <li>libLLVMScalarOpts.a</li> |
| 422 | <li>libLLVMSupport.a</li> |
| 423 | <li>libLLVMTarget.a</li> |
| 424 | <li>LLVMCodeGen.o</li> |
| 425 | <li>LLVMCore.o</li> |
| 426 | </ul></dd> |
| 427 | <dt><b>LLVMbzip2.o</b</dt><dd><ul> |
| 428 | </ul></dd> |
| 429 | <dt><b>LLVMipa.o</b</dt><dd><ul> |
| 430 | <li>libLLVMAnalysis.a</li> |
| 431 | <li>libLLVMSupport.a</li> |
| 432 | <li>LLVMCore.o</li> |
| 433 | </ul></dd> |
| 434 | <dt><b>LLVMipo.o</b</dt><dd><ul> |
| 435 | <li>libLLVMAnalysis.a</li> |
| 436 | <li>libLLVMipa.a</li> |
| 437 | <li>libLLVMScalarOpts.a</li> |
| 438 | <li>libLLVMSupport.a</li> |
| 439 | <li>libLLVMTarget.a</li> |
| 440 | <li>libLLVMTransformUtils.a</li> |
| 441 | <li>LLVMCore.o</li> |
| 442 | </ul></dd> |
| 443 | </dl> |
| 444 | </div> |
| 445 | |
| 446 | <!-- ======================================================================= --> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 447 | <div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div> |
| 448 | <div class="doc_text"> |
| 449 | <p>This section contains various "rules of thumb" about what files you |
| 450 | should link into your programs.</p> |
| 451 | </div> |
| 452 | <!-- ======================================================================= --> |
Misha Brukman | 6fb5166 | 2004-11-08 00:22:22 +0000 | [diff] [blame] | 453 | <div class="doc_subsection"><a name="always">Always Link LLVMCore, LLVMSupport, |
| 454 | and LLVMSystem</a></div> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 455 | <div class="doc_text"> |
Reid Spencer | 52afa7e | 2004-11-08 00:26:32 +0000 | [diff] [blame] | 456 | <p>No matter what you do with LLVM, the last three entries in the value of |
| 457 | your LLVMLIBS make variable should always be: |
| 458 | <tt>LLVMCore LLVMSupport.a LLVMSystem.a</tt>. There are no <tt>LLVM</tt> |
| 459 | programs that don't depend on these three.</p> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 460 | </div> |
| 461 | <!-- ======================================================================= --> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 462 | <div class="doc_subsection"><a name="onlyone">Never link both archive and |
| 463 | re-linked library</a></div> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 464 | <div class="doc_text"> |
Reid Spencer | 341d714 | 2004-10-31 23:00:25 +0000 | [diff] [blame] | 465 | <p>There is never any point to linking both the re-linked (<tt>.o</tt>) and |
| 466 | the archive (<tt>.a</tt>) versions of a library. Since the re-linked version |
| 467 | includes the entire library, the archive version will not resolve any symbols. |
Reid Spencer | 347e288 | 2004-11-08 00:24:43 +0000 | [diff] [blame] | 468 | 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] | 469 | the re-linked version on the linker's command line.</p> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 470 | </div> |
| 471 | <!-- ======================================================================= --> |
| 472 | <hr> |
| 473 | <div class="doc_footer"> |
Reid Spencer | bd72241 | 2004-11-01 09:19:53 +0000 | [diff] [blame] | 474 | <address> |
| 475 | <a href="http://jigsaw.w3.org/css-validator/check/referer"><img |
| 476 | src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"/></a> |
| 477 | <a href="http://validator.w3.org/check/referer"><img |
| 478 | src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a> |
| 479 | <a href="mailto:rspencer@x10sys.com">Reid Spencer</a> |
| 480 | </address> |
Chris Lattner | 6175735 | 2004-02-27 06:28:34 +0000 | [diff] [blame] | 481 | <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a> |
| 482 | <br>Last modified: $Date$ </div> |
| 483 | </body> |
| 484 | </html> |
| 485 | <!-- vim: sw=2 ts=2 ai |
| 486 | --> |