Improve the Getting Started and Hacking web pages, patch by

John Thompson!

llvm-svn: 79518
This commit is contained in:
Chris Lattner 2009-08-20 06:17:11 +00:00
parent 815fbb6026
commit f6bad8690f
2 changed files with 28 additions and 20 deletions

View File

@ -59,26 +59,28 @@ follows:</p>
http://www.python.org/download</a></li> http://www.python.org/download</a></li>
</ul> </ul>
<li><a href="http://www.llvm.org/docs/GettingStarted.html#checkout">Checkout <li>Checkout LLVM:</li>
and build LLVM</a> from SVN head:</li>
<ul> <ul>
<li>Change directory to where you want the llvm directory placed.</li>
<li><tt>svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm</tt></li> <li><tt>svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm</tt></li>
<li><tt>cd llvm</tt></li>
<li><tt>./configure; make</tt></li>
</ul> </ul>
<li>Checkout Clang:</li> <li>Checkout Clang:</li>
<ul> <ul>
<li>From within the <tt>llvm</tt> directory (where you <li><tt>cd llvm/tools</tt>
built llvm):</li> <li><tt>svn co http://llvm.org/svn/llvm-project/cfe/trunk clang</tt></li>
<li><tt>cd tools</tt> </ul>
<li><tt>svn co http://llvm.org/svn/llvm-project/cfe/trunk clang</tt></li> <li>Build LLVM and Clang:</li>
<ul>
<li><tt>cd ..</tt> (back to llvm)</li>
<li><tt>./configure</tt></li>
<li><tt>make</tt></li>
<li>This builds both LLVM and Clang for debug mode.</li>
<li>Note: For subsequent Clang development, you can just do make at the
clang directory level.</li>
</ul> </ul>
<li>If you intend to work on Clang C++ support, you may need to tell it how <li>If you intend to work on Clang C++ support, you may need to tell it how
to find your C++ standard library headers. If Clang cannot find your to find your C++ standard library headers. If Clang cannot find your
system libstdc++ headers, please follow these instructions:</li> system libstdc++ headers, please follow these instructions:</li>
<ul> <ul>
<li>'<tt>touch empty.cpp; gcc -v empty.cpp -fsyntax-only</tt>' to get the <li>'<tt>touch empty.cpp; gcc -v empty.cpp -fsyntax-only</tt>' to get the
path.</li> path.</li>
@ -86,13 +88,6 @@ follows:</p>
hard-coded paths" in <tt>clang/lib/Frontend/InitHeaderSearch.cpp</tt> and hard-coded paths" in <tt>clang/lib/Frontend/InitHeaderSearch.cpp</tt> and
change the lines below to include that path.</li> change the lines below to include that path.</li>
</ul> </ul>
<li>Build Clang:</li>
<ul>
<li><tt>cd clang</tt> (assuming that you are in <tt>llvm/tools</tt>)</li>
<li><tt>make</tt> (this will give you a debug build)</li>
</ul>
<li>Try it out (assuming you add llvm/Debug/bin to your path):</li> <li>Try it out (assuming you add llvm/Debug/bin to your path):</li>
<ul> <ul>
<li><tt>clang-cc --help</tt></li> <li><tt>clang-cc --help</tt></li>
@ -107,7 +102,6 @@ follows:</p>
<li><tt>clang-cc file.c -emit-llvm -o - | llvm-as | opt -std-compile-opts | llc <li><tt>clang-cc file.c -emit-llvm -o - | llvm-as | opt -std-compile-opts | llc
&gt; file.s</tt> (output native machine code)</li> &gt; file.s</tt> (output native machine code)</li>
</ul> </ul>
<p><em>Note</em>: Here <tt>clang-cc</tt> is the "low-level" frontend <p><em>Note</em>: Here <tt>clang-cc</tt> is the "low-level" frontend
executable that is similar in purpose to <tt>cc1</tt>. Clang also has a <a executable that is similar in purpose to <tt>cc1</tt>. Clang also has a <a
href="#driver">high-level compiler driver</a> that acts as a drop-in href="#driver">high-level compiler driver</a> that acts as a drop-in
@ -149,11 +143,18 @@ Visual Studio:</p>
http://www.cmake.org/cmake/resources/software.html</a></li> http://www.cmake.org/cmake/resources/software.html</a></li>
<li><b>Visual Studio 2005</b> <li><b>Visual Studio 2005</b>
(VS 2008 may work also - cmake outputs VS2005 project files)</li> (VS 2008 may work also - cmake outputs VS2005 project files)</li>
<li><b>Python</b>. This is need only if you will be running the tests <li><b>Python</b>. This is needed only if you will be running the tests
(which is essential, if you will be developing for clang). (which is essential, if you will be developing for clang).
Get it from: Get it from:
<a href="http://www.python.org/download"> <a href="http://www.python.org/download">
http://www.python.org/download</a></li> http://www.python.org/download</a></li>
<li><b>GnuWin32 tools</b>
These are also necessary for running the tests.
(Note that the grep from MSYS or Cygwin doesn't work with the tests
because of embedded double-quotes in the search strings. The GNU
grep does work in this case.)
Get them from <a href="http://getgnuwin32.sourceforge.net">
http://getgnuwin32.sourceforge.net</a>.</li>
</ul> </ul>
<li>Checkout LLVM:</li> <li>Checkout LLVM:</li>

View File

@ -136,6 +136,13 @@
Python, which must be installed. Find Python at: Python, which must be installed. Find Python at:
<a href="http://www.python.org/download">http://www.python.org/download</a>. <a href="http://www.python.org/download">http://www.python.org/download</a>.
Download the latest stable version (2.6.2 at the time of this writing).</p> Download the latest stable version (2.6.2 at the time of this writing).</p>
<p>The GnuWin32 tools are also necessary for running the tests.
(Note that the grep from MSYS or Cygwin doesn't work with the tests
because of embedded double-quotes in the search strings. The GNU
grep does work in this case.)
Get them from <a href="http://getgnuwin32.sourceforge.net">
http://getgnuwin32.sourceforge.net</a>.</p>
<!--=====================================================================--> <!--=====================================================================-->
<h2 id="patches">Creating Patch Files</h2> <h2 id="patches">Creating Patch Files</h2>