[llvm-commits] CVS: llvm/www/docs/GettingStarted.html
John Criswell
criswell at choi.cs.uiuc.edu
Wed Jun 25 16:45:01 PDT 2003
Changes in directory llvm/www/docs:
GettingStarted.html updated: 1.12 -> 1.12.2.1
---
Log message:
Added a requirements section so that people know what hardware and software
they will need.
Made more changes to reflect the new autoconf stuff.
---
Diffs of the changes:
Index: llvm/www/docs/GettingStarted.html
diff -u llvm/www/docs/GettingStarted.html:1.12 llvm/www/docs/GettingStarted.html:1.12.2.1
--- llvm/www/docs/GettingStarted.html:1.12 Sun Jun 8 10:33:25 2003
+++ llvm/www/docs/GettingStarted.html Wed Jun 25 16:44:08 2003
@@ -19,6 +19,7 @@
<li><a href="#overview">Overview</a>
<li><a href="#starting">Getting started with LLVM</a>
<ol>
+ <li><a href="#requirements">Requirements</a>
<li><a href="#quickstart">Getting started quickly (a summary)</a>
<li><a href="#checkout">Checkout LLVM from CVS</a>
<li><a href="#terminology">Terminology and Notation</tt></a>
@@ -66,6 +67,57 @@
</center>
<!--=====================================================================-->
+ <!--=====================================================================-->
+ <h3><a name="requirements"><b>Requirements</b></a></h3>
+ <!--=====================================================================-->
+
+ LLVM is known to work on the following platforms:
+ <ul>
+ <li> Linux/x86
+ <li> Solaris/Sparc
+ </ul>
+
+ Compiling LLVM requires that you have several different software packages
+ installed:
+ <ul>
+ <li> GCC
+ <p>
+ The GNU Compiler Collection must be installed with C and C++ language
+ support. GCC 3.x is supported, although some effort has been made to
+ support GCC 2.96.
+ </p>
+
+ <p>
+ Note that we currently do not support any other C++ compiler.
+ </p>
+
+ <li> GNU Make
+ <p>
+ The LLVM build system relies upon GNU make extensions. Therefore, you
+ will need GNU Make (sometimes known as gmake) to build LLVM.
+ </p>
+
+ <li> Flex and Bison
+ <p>
+ The LLVM source code is built using flex and bison. You will not be
+ able to configure and compile LLVM without them.
+ </p>
+ </ul>
+
+ <p>
+ There are some additional tools that you may want to have when working with
+ LLVM:
+ </p>
+
+ <ul>
+ <li> GNU Autoconf and GNU M4
+ <p>
+ If you want to make changes to the autoconf scripts which configure LLVM
+ for compilation, you will need GNU autoconf, and consequently, GNU M4.
+ LLVM was built with autoconf 2.53, so that release and any later
+ releases should work.
+ </p>
+ </ul>
<!--=====================================================================-->
<h3><a name="quickstart"><b>Getting Started Quickly (A Summary)</b></a></h3>
@@ -77,9 +129,17 @@
<li><tt>cd <i>where-you-want-llvm-to-live</i></tt>
<li><tt>cvs -d <i>CVSROOTDIR</i> checkout llvm</tt>
<li><tt>cd llvm</tt>
- <li>Edit <tt>Makefile.config</tt> to set local paths. This includes
- setting the install location of the C frontend, and the various paths
- to the C and C++ compilers used to build LLVM itself.
+ <li>Run <tt>configure</tt> to configure the Makefiles and header files.
+ Useful options include:
+ <ul>
+ <li><tt>--with-objroot=<i>directory</i></tt>
+ <br>
+ Specifiy where object files should be placed during the build.
+
+ <li><tt>--with-llvmgccdir=<i>directory</i></tt>
+ <br>
+ Specifiy where the LLVM C frontend has been installed.
+ </ul>
<li>Set your LLVM_LIB_SEARCH_PATH environment variable.
<li><tt>gmake -k |& tee gnumake.out
# this is csh or tcsh syntax</tt>
@@ -95,10 +155,10 @@
<h3><a name="terminology">Terminology and Notation</a></h3>
<!------------------------------------------------------------------------->
- <p>Through this manual, the following names are used to denote paths
+ <p>Throughout this manual, the following names are used to denote paths
specific to the local system and working environment. <i>These are not
- environment variables you need to set, but just strings used in the rest
- of this document below.</i>. In any of the examples below, simply replace
+ environment variables you need to set but just strings used in the rest
+ of this document below</i>. In any of the examples below, simply replace
each of these names with the appropriate pathname on your local system.
All these paths are absolute:</p>
<ul>
@@ -109,7 +169,7 @@
<!------------------------------------------------------------------------->
<p>Before checking out the source code, you will need to know the path to
- CVS repository containing LLVM source code (we'll call this
+ the CVS repository containing the LLVM source code (we'll call this
<i>CVSROOTDIR</i> below). Ask the person responsible for your local LLVM
installation to give you this path.
@@ -128,46 +188,71 @@
<h3><a name="config">Local Configuration Options</a></h3>
<!------------------------------------------------------------------------->
- <p>The file <tt>llvm/Makefile.config</tt>
- defines the following path variables,
- which are specific to a particular installation of LLVM.
- These should need to be modified only once after checking out a copy
- of LLVM (if the default values do not already match your system):
+ <p>Once checked out from the CVS repository, options and pathnames specific
+ to an installation of LLVM can be set via the <tt>configure</tt> script.
+ This script sets variables in <tt>llvm/Makefile.config</tt> and
+ <tt>llvm/include/Config/config.h</tt>.
+
+ <p>
+ The following environment variables are used by <tt>configure</tt> to
+ configure Makefile.config:
+ </p>
<ul>
- <p><li><i>CXX</i> = Path to C++ compiler to use.
- <p><li><i>LLVM_OBJ_DIR</i> = Path to the llvm directory where
- object files should be placed.
- (See the Section on <a href=#objfiles>
- The location for LLVM object files</a>
- for more information.)
- <p><li><i>LLVMGCCDIR</i> = Path to the location of the LLVM front-end
- binaries and associated libraries.
- <p><li><i>PURIFY</i> = Path to the purify program.
+ <p><li><i>CXX</i> = Pathname of the C++ compiler to use.
+ <p><li><i>CC</i> = Pathname of the C compiler to use.
</ul>
- In addition to settings in this file, you must set a
+ The following options can be used to set or enable LLVM specific options:
+
+ <ul>
+ <p><li><i>--with-objroot=LLVM_OBJ_ROOT</i> =
+ Path to the directory where
+ object files, libraries, and executables should be placed.
+ (See the Section on <a href=#objfiles>
+ The location for LLVM object files</a>
+ for more information.)
+ <p><li><i>--with-llvmgccdir=LLVMGCCDIR</i> =
+ Path to the location of the LLVM front-end
+ binaries and associated libraries.
+ <p><li><i>--enable-optimized</i> =
+ Enables optimized compilation (debugging symbols are removed and GCC
+ optimization flags are enabled).
+ <p><li><i>--enable-profiling</i> =
+ Enables profiling compilation (compiler flags needed to add profiling
+ data are enabled).
+ <p><li><i>--enable-verbose</i> =
+ Enables verbose messages during the compile.
+ <p><li><i>--enable-jit</i> =
+ Compile the Just In Time (JIT) functionality. This is not available
+ on all platforms.
+ </ul>
+
+ In addition to running <tt>configure</tt>, you must set the
<tt>LLVM_LIB_SEARCH_PATH</tt> environment variable in your startup scripts.
This environment variable is used to locate "system" libraries like
"<tt>-lc</tt>" and "<tt>-lm</tt>" when linking. This variable should be set
to the absolute path for the bytecode-libs subdirectory of the C front-end
- install. For example,
+ install. For example, <tt>LLVM_LIB_SEARCH_PATH</tt> is set to
<tt>/home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs</tt> for the X86
- version of the C front-end, on our research machines.<p>
+ version of the C front-end on our research machines.<p>
<!------------------------------------------------------------------------->
<h3><a name="objfiles">The location for LLVM object files</a></h3>
<!------------------------------------------------------------------------->
<p>The LLVM make system sends most output files generated during the build
- into the directory defined by the variable LLVM_OBJ_DIR in
+ into the directory defined by the variable OBJ_ROOT in
<tt>llvm/Makefile.config</tt>. This can be either just your normal LLVM
source tree or some other directory writable by you. You may wish to put
object files on a different filesystem either to keep them from being backed
up or to speed up local builds.
- <p>If you do not wish to use a different location for object files (building
- into the source tree directly), just set this variable to ".".<p>
+ <p>If you wish to place output files into a separate directory, use the
+ <tt>--with-objroot=<i>directory</i></tt> option of <tt>configure</tt> to
+ set the top level directory of where the object files will go. Otherwise,
+ leave this option unspecified, and <tt>configure</tt> will place files
+ within the LLVM source tree.
<!------------------------------------------------------------------------->
<h3><a name="environment">Setting up your environment</a></h3>
@@ -185,13 +270,13 @@
alias llvmgcc <i>LLVMGCCDIR</i><tt>/bin/llvm-gcc</tt>
# Make the LLVM tools easy to use...
- setenv PATH <i>LLVM_OBJ_DIR</i>/llvm/tools/Debug:${PATH}
+ setenv PATH <i>OBJ_ROOT</i>/llvm/tools/Debug:${PATH}
</pre>
The <tt>llvmgcc</tt> alias is useful because the C compiler is not
included in the CVS tree you just checked out.
-
+
<p>The other <a href="#tools">LLVM tools</a> are part of the LLVM
- source base, and built when compiling LLVM. They will be built into the
+ source base and are built when compiling LLVM. They will be built into the
<tt><i>LLVM_OBJ_DIR</i>/tools/Debug</tt> directory.</p>
<!------------------------------------------------------------------------->
@@ -199,13 +284,14 @@
<!------------------------------------------------------------------------->
<p>Every directory in the LLVM source tree includes a <tt>Makefile</tt> to
- build it, and any subdirectories that it contains. These makefiles require
+ build it and any subdirectories that it contains. These makefiles require
that you use <tt>gmake</tt>, instead of <tt>make</tt> to build them, but can
otherwise be used freely. To build the entire LLVM system, just enter the
top level <tt>llvm</tt> directory and type <tt>gmake</tt>. A few minutes
later you will hopefully have a freshly compiled toolchain waiting for you
- in <tt>llvm/tools/Debug</tt>. If you want to look at the libraries that
- were compiled, look in <tt>llvm/lib/Debug</tt>.</p>
+ in <tt><i>OBJ_ROOT</i>/llvm/tools/Debug</tt>. If you want to look at the
+ libraries that
+ were compiled, look in <tt><i>OBJ_ROOT</i>/llvm/lib/Debug</tt>.</p>
If you get an error talking about a <tt>/localhome</tt> directory, follow
the instructions in the section about <a href="#environment">Setting Up Your
@@ -238,8 +324,10 @@
directories</a></h3>
<!------------------------------------------------------------------------->
- If you are building with the "<tt>BUILD_ROOT=.</tt>" option enabled in the
- <tt>Makefile.common</tt> file, most source directories will contain two
+ If you are building with the "<tt>OBJ_ROOT=.</tt>" option enabled in the
+ <tt>Makefile.config</tt> file (i.e. you did not specify
+ <tt>--with-objroot</tt> when you ran <tt>configure</tt>), most source
+ directories will contain two
directories, <tt>Depend</tt> and <tt>Debug</tt>. The <tt>Depend</tt>
directory contains automatically generated dependance files which are used
during compilation to make sure that source files get rebuilt if a header
@@ -247,7 +335,7 @@
files, library files and executables that are used for building a debug
enabled build. The <tt>Release</tt> directory is created to hold the same
files when the <tt>ENABLE_OPTIMIZED=1</tt> flag is passed to <tt>gmake</tt>,
- causing an optimized built to be performed.<p>
+ causing an optimized build to be performed.<p>
<!------------------------------------------------------------------------->
@@ -255,7 +343,7 @@
<!------------------------------------------------------------------------->
This directory contains public header files exported from the LLVM
- library. The two main subdirectories of this directory are:<p>
+ library. The three main subdirectories of this directory are:<p>
<ol>
<li><tt>llvm/include/llvm</tt> - This directory contains all of the LLVM
@@ -267,13 +355,20 @@
support libraries that are independant of LLVM, but are used by LLVM.
For example, some C++ STL utilities and a Command Line option processing
library.
+
+ <li><tt>llvm/include/Config</tt> - This directory contains header files
+ configured by the <tt>configure</tt> script. They wrap "standard" UNIX
+ and C header files. Source code can include these header files which
+ automatically take care of the conditional #includes that the configure
+ script generates.
</ol>
<!------------------------------------------------------------------------->
<h3><a name="lib"><tt>llvm/lib</tt></a></h3>
<!------------------------------------------------------------------------->
- This directory contains most source files of LLVM system. In LLVM almost all
+ This directory contains most of the source files of the LLVM system. In
+ LLVM almost all
code exists in libraries, making it very easy to share code among the
different <a href="#tools">tools</a>.<p>
@@ -362,7 +457,7 @@
<dt><tt><b>gccas</b></tt><dd> This tool is invoked by the
<tt>llvmgcc</tt> frontend as the "assembler" part of the compiler. This
tool actually assembles LLVM assembly to LLVM bytecode,
- performs a variety of optimizations,
+ performs a variety of optimizations,
and outputs LLVM bytecode. Thus when you invoke <tt>llvmgcc -c x.c -o
x.o</tt>, you are causing <tt>gccas</tt> to be run, which writes the
<tt>x.o</tt> file (which is an LLVM bytecode file that can be
More information about the llvm-commits
mailing list