<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Getting Started with LLVM System</title>
</head>
<body bgcolor=white>
<center><h1>Getting Started with the LLVM System<br><font size=3>By: <a
href="mailto:gshi1@uiuc.edu">Guochun Shi</a>,
<a href="mailto:sabre@nondot.org">Chris Lattner</a>,
<a href="mailto:criswell@uiuc.edu">John Criswell</a>,
<a href="http://misha.brukman.net">Misha Brukman</a>, and
<a href="http://www.cs.uiuc.edu/~vadve">Vikram Adve</a>
</font></h1></center>
<!--=====================================================================-->
<h2><a name="Contents">Contents</a></h2>
<!--=====================================================================-->
<ul>
<li><a href="#overview">Overview</a>
<li><a href="#quickstart">Getting Started Quickly (A Summary)</a>
<li><a href="#requirements">Requirements</a>
<ol>
<li><a href="#hardware">Hardware</a>
<li><a href="#software">Software</a>
</ol>
<li><a href="#starting">Getting Started with LLVM</a>
<ol>
<li><a href="#terminology">Terminology and Notation</tt></a>
<li><a href="#environment">Setting Up Your Environment</a>
<li><a href="#unpack">Unpacking the LLVM Archives</a>
<li><a href="#checkout">Checkout LLVM from CVS</a>
<li><a href="#installcf">Install the GCC Front End</a>
<li><a href="#config">Local LLVM Configuration</tt></a>
<li><a href="#compile">Compiling the LLVM Suite Source Code</a>
<li><a href="#objfiles">The Location of LLVM Object Files</tt></a>
</ol>
<li><a href="#layout">Program layout</a>
<ol>
<li><a href="#cvsdir"><tt>CVS</tt> directories</a>
<li><a href="#include"><tt>llvm/include</tt></a>
<li><a href="#lib"><tt>llvm/lib</tt></a>
<li><a href="#runtime"><tt>llvm/runtime</tt></a>
<li><a href="#test"><tt>llvm/test</tt></a>
<li><a href="#tools"><tt>llvm/tools</tt></a>
<li><a href="#utils"><tt>llvm/utils</tt></a>
</ol>
<li><a href="#tutorial">An Example Using the LLVM Tool Chain</a>
<li><a href="#problems">Common Problems</a>
<li><a href="#links">Links</a>
</ul>
<!--=====================================================================-->
<center>
<h2><a name="overview"><b>Overview</b></a></h2>
</center>
<hr>
<!--=====================================================================-->
Welcome to LLVM! In order to get started, you first need to know some
basic information.
<p>
First, LLVM comes in two pieces. The first piece is the LLVM suite. This
contains all of the tools, libraries, and header files needed to use the
low level virtual machine. It contains an assembler, disassembler,
bytecode analyzer, and bytecode optimizer. It also contains a test suite
that can be used to test the LLVM tools and the GCC front end.
<p>
The second piece is the GCC front end. This component provides a version
of GCC that compiles C and C++ code into LLVM bytecode. Currently, the
GCC front end is a modified version of GCC 3.4 (we track the GCC 3.4
development). Once compiled into LLVM bytecode, a program can be
manipulated with the LLVM tools from the LLVM suite.
<!--=====================================================================-->
<center>
<h2><a name="quickstart"><b>Getting Started Quickly (A Summary)</b></a></h2>
</center>
<hr>
<!--=====================================================================-->
Here's the short story for getting up and running quickly with LLVM:
<ol>
<li>Install the GCC front end:
<ol>
<li><tt>cd <i>where-you-want-the-C-front-end-to-live</i></tt>
<li><tt>gunzip --stdout cfrontend.<i>platform</i>.tar.gz | tar -xvf
-</tt>
<li><b>Sparc Only:</b><br>
<tt>
cd cfrontend/sparc<br>
./fixheaders
</tt>
</ol>
<p>
<li>Get the Source Code
<ul>
<li>With the distributed files:
<ol>
<li><tt>cd <i>where-you-want-llvm-to-live</i></tt>
<li><tt>gunzip --stdout llvm.tar.gz | tar -xvf -</tt>
<li><tt>cd llvm</tt>
</ol>
<p