diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index 0f77b2275d1..903d73560d1 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -26,9 +26,9 @@
- The second piece is the C front end. This component provides a version - of GCC that compiles C code into LLVM bytecode. Currently, the C 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. + 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.
- If you want to compile your own version of the C front end, you will need + If you want to compile your own version of the GCC front end, you will need additional disk space:
@@ -210,11 +211,11 @@ -The next section of this guide is meant to get - you up and running with LLVM and to give you some basic information about - the LLVM environment. The first subsection gives - a short summary for those who are already familiar with the system and - want to get started as quickly as possible. +
The remainder of this guide is meant to get you up and running with + LLVM and to give you some basic information about the LLVM environment. + The next section gives a short summary for those + who are already familiar with the system and want to get started as quickly + as possible. A more complete description is provided after that.
The later sections of this guide describe the general layout of the the LLVM source-tree, a
See Setting Up Your Environment on tips to
simplify working with the LLVM front-end and compiled tools. See the
- other sub-sections below for other useful details in working with LLVM,
+ next section for other useful details in working with LLVM,
or go straight to Program Layout to learn about the
- layout of the source code tree. For information on building the C front
- end yourself, see Compiling the LLVM C Front End for
+ layout of the source code tree. For information on building the GCC front
+ end yourself, see Compiling the LLVM GCC Front End for
information.
+
+
+
+
- For the pre-built C front end binaries, the LLVMGCCDIR is
+ For the pre-built GCC front end binaries, the LLVMGCCDIR is the
cfrontend/platform/llvm-gcc.
@@ -423,24 +426,24 @@
test directories, and local copies of documentation files.
- Note that the C front end is not included in the CVS repository. You
+ Note that the GCC front end is not included in the CVS repository. You
should have either downloaded the source, or better yet, downloaded the
binary distribution for your platform.
- Before configuring and compiling the LLVM suite, it is best to extract the
- LLVM C front end. While not used in building, the C front end is used by
- the LLVM test suite, and its location must be given to the
- configure script before the LLVM suite can be built.
+ Before configuring and compiling the LLVM suite, you need to extract the
+ LLVM GCC front end from the binary distribution. It is used for building the
+ bytecode libraries later used by the GCC front end for linking programs, and
+ its location must be specified when the LLVM suite is configured.
- To install the C front end, do the following:
+ To install the GCC front end, do the following:
Once checked out from the CVS repository, the LLVM suite source code
must be configured via the configure script. This script sets
variables in llvm/Makefile.config and
- llvm/include/Config/config.h.
+ llvm/include/Config/config.h. It also populates OBJ_ROOT with
+ the Makefiles needed to build LLVM.
The following environment variables are used by the configure
@@ -495,26 +499,6 @@
+
+ To configure LLVM, follow these steps:
+
+
+
+ Getting Started with LLVM
+ Getting Started Quickly (A Summary)
Getting Started Quickly (A Summary)
+
Here's the short story for getting up and running quickly with LLVM:
-
@@ -271,18 +267,14 @@
-
@@ -301,12 +293,19 @@
-
- Specify where object files should be placed during the
- build.
-
- Specify where the LLVM C frontend is going to be installed.
+ Specify where the LLVM GCC frontend is installed.
Getting Started with LLVM
+
+
+
Terminology and Notation
@@ -325,33 +324,36 @@
give you this path.
@@ -394,15 +397,15 @@
Install the C Front End
+ Install the GCC Front End
-
+
-
- (See the Section on
- The Location of LLVM Object Files
- for more information.)
-
+
+
+ cd OBJ_ROOT
+
+ SRC_ROOT/configure
+
@@ -569,12 +580,12 @@
gmake @@ -588,7 +599,7 @@ gmake -j2
- There are several other targets which are useful when working with the LLVM + There are several special targets which are useful when working with the LLVM source code:
+ +
+
- Every directory in the LLVM source tree includes a Makefile to + Every directory in the LLVM object tree includes a Makefile to build it and any subdirectories that it contains. Entering any directory - inside the LLVM source tree and typing gmake should rebuild + inside the LLVM object tree and typing gmake should rebuild anything in or below that directory that is out of date.
The LLVM build system sends most output files generated during the build - into the directory defined by the variable OBJ_ROOT in - llvm/Makefile.config, which is set by the --with-objroot - option in configure. 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. -
- If OBJ_ROOT is specified, then the build system will create a - directory tree underneath it that resembles the source code's pathname - relative to your home directory (unless OBJ_ROOT is set to - ., in which case object files are placed within the LLVM source - tree). -
- + The LLVM build system is capable of sharing a single LLVM source tree among + several LLVM builds. Hence, it is possible to build LLVM for several + different platforms or configurations using the same source tree.- Note that - --with-objroot=. - and - --with-objroot=`pwd` - are not the same thing. The former will simply place object files within - the source tree, while the latter will set the location of object files - using the source tree's relative path from the home directory. -
+ This is accomplished in the typical autoconf manner: ++ cd OBJ_ROOT -
- For example, suppose that OBJ_ROOT is set to /tmp and the - LLVM suite source code is located in /usr/home/joe/src/llvm, where - /usr/home/joe is the home directory of a user named Joe. Then, - the object files will be placed in /tmp/src/llvm. -
++ SRC_ROOT/configure +
The LLVM build will place files underneath OBJ_ROOT in directories @@ -678,9 +682,9 @@
@@ -688,9 +692,9 @@
@@ -698,9 +702,9 @@
One useful source of information about the LLVM source base is the LLVM + One useful source of information about the LLVM source base is the LLVM doxygen documentation, available at http://llvm.cs.uiuc.edu/doxygen/. The - following is a brief introduction to code layout:
- + href="http://llvm.cs.uiuc.edu/doxygen/">http://llvm.cs.uiuc.edu/doxygen/. + The following is a brief introduction to code layout: ++ This directory contains libraries which are compiled into LLVM bytecode and + used when linking programs with the GCC front end. Most of these libraries + are skeleton versions of real libraries; for example, libc is a stripped down + version of glibc. +
+ ++ Unlike the rest of the LLVM suite, this directory needs the LLVM GCC front end + to compile. +
+This directory contains regression tests and source code that is used to - test the LLVM infrastructure...
+ test the LLVM infrastructure. +- This step is optional if you have the C front end binary distribution for + This step is optional if you have the GCC front end binary distribution for your platform.
- Now that you have the LLVM suite built, you can build the C front end. For + Now that you have the LLVM suite built, you can build the GCC front end. For those of you that have built GCC before, the process is very similar.- Be forewarned, though: the build system for the C front end is not as + Be forewarned, though: the build system for the GCC front end is not as polished as the rest of the LLVM code, so there will be many warnings and errors that you will need to ignore for now: @@ -1018,6 +1039,7 @@
This document is just an introduction to how to use LLVM to do