X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGettingStarted.html;h=0a6a4811880ebc2145514e8abb955d3e9807cd7f;hb=4b1fd0b288ae38d288affdbd9159d838b1a68447;hp=5779f6e4e7d23c229c38b53a2863708734fa5606;hpb=c44c245d0cd70d6932eddd069c4e95c2754b7fd8;p=oota-llvm.git diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index 5779f6e4e7d..0a6a4811880 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -8,9 +8,9 @@
-Written by: John Criswell, Chris Lattner, - Misha Brukman, + Misha Brukman, Vikram Adve, and Guochun Shi.
@@ -70,12 +70,12 @@ -Welcome to LLVM! In order to get started, you first need to know some basic information.
@@ -102,12 +102,12 @@ and performance.Here's the short story for getting up and running quickly with LLVM:
@@ -116,13 +116,13 @@ and performance.Before you begin to use the LLVM system, review the requirements given below. This may save you some trouble by knowing ahead of time what hardware and software you will need.
-LLVM is known to work on the following platforms:
@@ -244,6 +242,11 @@ software you will need.Notes:
@@ -332,9 +341,10 @@ up before any Windows-based versions such as Strawberry Perl and ActivePerl, as these have Windows-specifics that will cause the build to fail. -Compiling LLVM requires that you have several software packages installed. The table below lists those required packages. The Package column is the usual name for the software package that LLVM depends on. The Version @@ -375,13 +387,13 @@ href="GCCFEBuildInstrs.html">try to compile it on your platform.
LLVM is very demanding of the host C++ compiler, and as such tends to expose
bugs in the compiler. In particular, several versions of GCC crash when trying
-to compile LLVM. We routinely use GCC 3.3.3, 3.4.0, and Apple 4.0.1
-successfully with them (however, see important notes below). Other versions
-of GCC will probably work as well. GCC versions listed
+to compile LLVM. We routinely use GCC 4.2 (and higher) or Clang.
+Other versions of GCC will probably work as well. GCC versions listed
here are known to not work. If you are using one of these versions, please try
to upgrade your GCC to something more recent. If you run into a problem with a
version of GCC not listed here, please let
@@ -566,6 +582,9 @@ as the previous one. It appears to work with ENABLE_OPTIMIZED=0 (the default).
GCC 4.3.3 (Debian 4.3.3-10) on ARM: Miscompiles parts of LLVM 2.6
when optimizations are turned on. The symptom is an infinite loop in
FoldingSetImpl::RemoveNode while running the code generator. GCC 4.3.5 and GCC 4.4.5 on ARM: These can miscompile value >>
+1 even at -O0. A test failure in test/Assembler/alignstack.ll is
+one symptom of the problem.
GNU ld 2.16.X. Some 2.16.X versions of the ld linker will produce very
long warning messages complaining that some ".gnu.linkonce.t.*" symbol was
defined in a discarded section. You can safely ignore these messages as they are
@@ -585,15 +604,15 @@ upgrading to a newer version of Gold.
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.
@@ -603,14 +622,13 @@ href="#layout">general layout of the the LLVM source tree, a simple example using the LLVM tool chain, and links to find more information about LLVM or to get help via e-mail. -Throughout this manual, the following names are used to denote paths specific to the local system and working environment. These are not @@ -643,11 +661,11 @@ All these paths are absolute:
In order to compile and use LLVM, you may need to set some environment @@ -666,11 +684,11 @@ variables.
If you have the LLVM distribution, you will need to unpack it before you @@ -700,11 +718,11 @@ compressed with the gzip program.
If you have access to our Subversion repository, you can get a fresh copy of the entire source code. All you need to do is check it out from Subversion as @@ -728,6 +746,7 @@ revision), you can checkout it from the 'tags' directory (instead of subdirectories of the 'tags' directory:
GIT mirrors are available for a number of LLVM subprojects. These mirrors + sync automatically with each Subversion commit and contain all necessary + git-svn marks (so, you can recreate git-svn metadata locally). Note that right + now mirrors reflect only trunk for each project. You can do the + read-only GIT clone of LLVM via:
+ ++git clone http://llvm.org/git/llvm.git ++ +
If you want to check out clang too, run:
+ ++git clone http://llvm.org/git/llvm.git +cd llvm/tools +git clone http://llvm.org/git/clang.git ++ +
+Since the upstream repository is in Subversion, you should use +"git pull --rebase" +instead of "git pull" to avoid generating a non-linear +history in your clone. +To configure "git pull" to pass --rebase by default +on the master branch, run the following command: +
+ ++git config branch.master.rebase true ++ +
+Please read Developer Policy, too. +
+ ++Assume master points the upstream and mybranch points your +working branch, and mybranch is rebased onto master. +At first you may check sanity of whitespaces: +
+ ++git diff --check master..mybranch ++ +
+The easiest way to generate a patch is as below: +
+ ++git diff master..mybranch > /path/to/mybranch.diff ++ +
+It is a little different from svn-generated diff. git-diff-generated diff has +prefixes like a/ and b/. Don't worry, most developers might +know it could be accepted with patch -p1 -N. +
+ ++But you may generate patchset with git-format-patch. It generates +by-each-commit patchset. To generate patch files to attach to your article: +
+ ++git format-patch --no-attach master..mybranch -o /path/to/your/patchset ++ +
+If you would like to send patches directly, you may use git-send-email or +git-imap-send. Here is an example to generate the patchset in Gmail's [Drafts]. +
+ ++git format-patch --attach master..mybranch --stdout | git imap-send ++ +
+Then, your .git/config should have [imap] sections. +
+ ++[imap] + host = imaps://imap.gmail.com + user = your.gmail.account@gmail.com + pass = himitsu! + port = 993 + sslverify = false +; in English + folder = "[Gmail]/Drafts" +; example for Japanese, "Modified UTF-7" encoded. + folder = "[Gmail]/&Tgtm+DBN-" +; example for Traditional Chinese + folder = "[Gmail]/&g0l6Pw-" ++
To set up clone from which you can submit code using + git-svn, run:
+ ++git clone http://llvm.org/git/llvm.git +cd llvm +git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username> +git config svn-remote.svn.fetch :refs/remotes/origin/master +git svn rebase -l # -l avoids fetching ahead of the git mirror. + +# If you have clang too: +cd tools +git clone http://llvm.org/git/clang.git +cd clang +git svn init https://llvm.org/svn/llvm-project/cfe/trunk --username=<username> +git config svn-remote.svn.fetch :refs/remotes/origin/master +git svn rebase -l ++ +
To update this clone without generating git-svn tags that conflict +with the upstream git repo, run:
+ ++git fetch && (cd tools/clang && git fetch) # Get matching revisions of both trees. +git checkout master +git svn rebase -l +(cd tools/clang && + git checkout master && + git svn rebase -l) ++ +
This leaves your working directories on their master branches, so +you'll need to checkout each working branch individually and +rebase it on top of its parent branch. (Note: This script is +intended for relative newbies to git. If you have more experience, +you can likely improve on it.)
+ +The git-svn metadata can get out of sync after you mess around with
+branches and dcommit
. When that happens, git svn
+dcommit
stops working, complaining about files with uncommitted
+changes. The fix is to rebuild the metadata:
+rm -rf .git/svn +git svn rebase -l ++ +
Before configuring and compiling the LLVM suite (or if you want to use just the LLVM GCC front end) you can optionally extract the front end from the binary distribution. @@ -783,7 +963,7 @@ you can optionally build llvm-gcc yourself a main LLVM repository.
To install the GCC front end, do the following (on Windows, use an archival tool -like 7-zip that understands gzipped tars):
+like 7-zip that understands gzipped tars):Once checked out from the Subversion repository, the LLVM suite source code must be @@ -962,11 +1142,11 @@ script to configure the build system:
Once you have configured LLVM, you can build it. There are three types of builds:
@@ -1096,11 +1276,11 @@ that directory that is out of date.It is possible to cross-compile LLVM itself. That is, you can create LLVM executables and libraries to be hosted on a platform different from the platform where they are build (a Canadian Cross build). To configure a @@ -1114,11 +1294,11 @@ that directory that is out of date.
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 @@ -1174,11 +1354,11 @@ named after the build type:
If you're running on a Linux system that supports the " This allows you to execute LLVM bitcode files directly. On Debian, you -can also use this command instead of the 'echo' command above:
+can also use this command instead of the 'echo' command above:One useful source of information about the LLVM source base is the LLVM doxygen documentation available at doxygen documentation available at http://llvm.org/doxygen/. The following is a brief introduction to code layout:
-This directory contains some simple examples of how to use the LLVM IR and JIT.
This directory contains public header files exported from the LLVM library. The three main subdirectories of this directory are:
@@ -1260,8 +1446,11 @@ library. The three main subdirectories of this directory are: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 @@ -1300,6 +1489,10 @@ different tools.
This directory contains projects that are not strictly part of LLVM but are shipped with LLVM. This is also the directory where you should create your own LLVM-based projects. See llvm/projects/sample for an example of how @@ -1330,8 +1523,11 @@ different tools.
This directory contains libraries which are compiled into LLVM bitcode and used when linking programs with the GCC front end. Most of these libraries are @@ -1344,16 +1540,22 @@ end to compile.
This directory contains feature and regression tests and other basic sanity checks on the LLVM infrastructure. These are intended to run quickly and cover a lot of territory without being exhaustive.
This is not a directory in the normal llvm module; it is a separate Subversion module that must be checked out (usually to projects/test-suite). @@ -1368,8 +1570,11 @@ end to compile.
The tools directory contains the executables built out of the libraries above, which form the main part of the user interface. You can @@ -1387,16 +1592,6 @@ information is in the Command Guide.
href="HowToSubmitABug.html">HowToSubmitABug.html for more information on using bugpoint. -This directory contains utilities for working with LLVM source code, and some of the utilities are actually required as part of the build process because they @@ -1515,22 +1713,15 @@ are code generators for parts of LLVM infrastructure.
This directory contains build scripts and project files for use with - Visual C++. This allows developers on Windows to build LLVM without the need - for Cygwin. The contents of this directory should be considered experimental - at this time. -
This section gives an example of using LLVM. llvm-gcc3 is now obsolete, so we only include instructions for llvm-gcc4.
@@ -1541,12 +1732,13 @@ create bitcode by default: gcc4 produces native code. As the example belo the '--emit-llvm' flag is needed to produce LLVM bitcode output. For makefiles and configure scripts, the CFLAGS variable needs '--emit-llvm' to produce bitcode output. -First, create a simple C file, name it 'hello.c':
@@ -1627,14 +1819,15 @@ int main() {If you are having problems building or using LLVM, or if you have any other general questions about LLVM, please consult the Frequently @@ -1643,12 +1836,12 @@ Asked Questions page.
This document is just an introduction on how to use LLVM to do some simple things... there are many more interesting and complicated things @@ -1676,7 +1869,7 @@ out:
Chris Lattner