<link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<body>
-<div class="doc_title">Using The LLVM Libraries</div>
+<h1>Using The LLVM Libraries</h1>
<ol>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#introduction">Introduction</a></li>
guide</a>.</p>
<!-- ======================================================================= -->
-<div class="doc_section"><a name="abstract">Abstract</a></div>
-<div class="doc_text">
+<h2><a name="abstract">Abstract</a></h2>
+<div>
<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
</div>
<!-- ======================================================================= -->
-<div class="doc_section"> <a name="introduction">Introduction</a></div>
-<div class="doc_text">
+<h2><a name="introduction">Introduction</a></h2>
+<div>
<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
correct for your tool can sometimes be challenging.
</div>
<!-- ======================================================================= -->
-<div class="doc_section"><a name="descriptions"></a>Library Descriptions</div>
-<div class="doc_text">
+<h2><a name="descriptions">Library Descriptions</a></h2>
+<div>
<p>The table below categorizes each library
<table style="text-align:left">
<tr><th>Library</th><th>Forms</th><th>Description</th></tr>
</div>
<!-- ======================================================================= -->
-<div class="doc_section"><a name="dependencies"></a>Using llvm-config</div>
-<div class="doc_text">
+<h2><a name="dependencies">Using llvm-config</a></h2>
+<div>
<p>The <tt>llvm-config</tt> tool is a perl script that produces on its output
various kinds of information. For example, the source or object directories
used to build LLVM can be accessed by passing options to <tt>llvm-config</tt>.
<!-- === This should be updated whenever new libraries are added, ===-->
<!-- === removed, or changed ===-->
<!-- =======NOTE: =========================================================-->
- <h2>Dependency Relationships Of Libraries</h2>
+ <h3>Dependency Relationships Of Libraries</h3>
<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>
+ <h3>Dependency Relationships Of Object Files</h3>
<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>
</div>
<!-- ======================================================================= -->
-<div class="doc_section"><a name="rot">Linkage Rules Of Thumb</a></div>
-<div class="doc_text">
+<h2><a name="rot">Linkage Rules Of Thumb</a></h2>
+<div>
<p>This section contains various "rules of thumb" about what files you
should link into your programs.</p>
-</div>
<!-- ======================================================================= -->
-<div class="doc_subsection"><a name="always">Always Link LLVMCore, LLVMSupport,
- and LLVMSystem</a></div>
-<div class="doc_text">
+<h3>
+ <a name="always">Always Link LLVMCore, LLVMSupport, and LLVMSystem</a>
+</h3>
+<div>
<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>
</div>
<!-- ======================================================================= -->
-<div class="doc_subsection"><a name="onlyone">Never link both archive and
- re-linked library</a></div>
-<div class="doc_text">
+<h3>
+ <a name="onlyone">Never link both archive and re-linked library</a>
+</h3>
+<div>
<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.
You could even end up with link error if you place the archive version before
the re-linked version on the linker's command line.</p>
</div>
+
+</div>
+
<!-- ======================================================================= -->
<hr>
<div class="doc_footer">