[llvm-commits] [llvm] r39915 - /llvm/trunk/docs/GettingStarted.html

Bill Wendling isanbard at gmail.com
Mon Jul 16 01:44:39 PDT 2007


Author: void
Date: Mon Jul 16 03:44:39 2007
New Revision: 39915

URL: http://llvm.org/viewvc/llvm-project?rev=39915&view=rev
Log:
Clean up some formatting. Add some doc_code div tags.

Modified:
    llvm/trunk/docs/GettingStarted.html

Modified: llvm/trunk/docs/GettingStarted.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.html?rev=39915&r1=39914&r2=39915&view=diff

==============================================================================
--- llvm/trunk/docs/GettingStarted.html (original)
+++ llvm/trunk/docs/GettingStarted.html Mon Jul 16 03:44:39 2007
@@ -722,10 +722,14 @@
 
 <p>If you would like to get the LLVM test suite (a separate package as of 1.4),
 you get it from the Subversion repository:</p>
+
+<div class="doc_code">
 <pre>
-  cd llvm/projects
-  svn co http://llvm.org/svn/llvm-project/test-suite/trunk llvm-test
+% cd llvm/projects
+% svn co http://llvm.org/svn/llvm-project/test-suite/trunk llvm-test
 </pre>
+</div>
+
 <p>By placing it in the <tt>llvm/projects</tt>, it will be automatically
 configured by the LLVM configure script as well as automatically updated when
 you run <tt>svn update</tt>.</p>
@@ -882,15 +886,16 @@
 <p>To configure LLVM, follow these steps:</p>
 
 <ol>
-    <li>Change directory into the object root directory:
-    <br>
-    <tt>cd <i>OBJ_ROOT</i></tt>
-    <br><br>
+    <li><p>Change directory into the object root directory:</p>
 
-    <li>Run the <tt>configure</tt> script located in the LLVM source tree:
-    <br>
-    <tt><i>SRC_ROOT</i>/configure --prefix=/install/path [other options]</tt>
-    <br><br>
+    <div class="doc_code"><pre>% cd <i>OBJ_ROOT</i></pre></div></li>
+
+    <li><p>Run the <tt>configure</tt> script located in the LLVM source
+    tree:</p>
+
+    <div class="doc_code">
+    <pre>% <i>SRC_ROOT</i>/configure --prefix=/install/path [other options]</pre>
+    </div></li>
 </ol>
 
 </div>
@@ -934,7 +939,7 @@
 <p>Once you have LLVM configured, you can build it by entering the
 <i>OBJ_ROOT</i> directory and issuing the following command:</p>
 
-<p><tt>gmake</tt></p>
+<div class="doc_code"><pre>% gmake</pre></div>
 
 <p>If the build fails, please <a href="#brokengcc">check here</a> to see if you
 are using a version of GCC that is known not to compile LLVM.</p>
@@ -944,7 +949,7 @@
 the parallel build options provided by GNU Make.  For example, you could use the
 command:</p>
 
-<p><tt>gmake -j2</tt></p>
+<div class="doc_code"><pre>% gmake -j2</pre></div>
 
 <p>There are several special targets which are useful when working with the LLVM
 source code:</p>
@@ -1082,12 +1087,12 @@
 <ul>
   <li><p>Change directory to where the LLVM object files should live:</p>
 
-      <p><tt>cd <i>OBJ_ROOT</i></tt></p></li>
+      <div class="doc_code"><pre>% cd <i>OBJ_ROOT</i></pre></div></li>
 
   <li><p>Run the <tt>configure</tt> script found in the LLVM source
       directory:</p>
 
-      <p><tt><i>SRC_ROOT</i>/configure</tt></p></li>
+      <div class="doc_code"><pre>% <i>SRC_ROOT</i>/configure</pre></div></li>
 </ul>
 
 <p>The LLVM build will place files underneath <i>OBJ_ROOT</i> in directories
@@ -1143,10 +1148,10 @@
 
 <div class="doc_code">
 <pre>
-   $ mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
-   $ echo ':llvm:M::llvm::/path/to/lli:' > /proc/sys/fs/binfmt_misc/register
-   $ chmod u+x hello.bc                (if needed)
-   $ ./hello.bc
+$ mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
+$ echo ':llvm:M::llvm::/path/to/lli:' > /proc/sys/fs/binfmt_misc/register
+$ chmod u+x hello.bc   (if needed)
+$ ./hello.bc
 </pre>
 </div>
 
@@ -1502,25 +1507,30 @@
 <div class="doc_text">
 
 <ol>
-  <li>First, create a simple C file, name it 'hello.c':
-       <pre>
-   #include <stdio.h>
-   int main() {
-     printf("hello world\n");
-     return 0;
-   }
-       </pre></li>
+  <li><p>First, create a simple C file, name it 'hello.c':</p>
+
+<div class="doc_code">
+<pre>
+#include <stdio.h>
+
+int main() {
+  printf("hello world\n");
+  return 0;
+}
+</pre></div></li>
 
   <li><p>Next, compile the C file into a native executable:</p>
 
-      <p><tt>% llvm-gcc hello.c -o hello</tt></p>
+      <div class="doc_code"><pre>% llvm-gcc hello.c -o hello</pre></div>
 
       <p>Note that llvm-gcc works just like GCC by default.  The standard -S and
         -c arguments work as usual (producing a native .s or .o file,
-        respectively). </p>
+        respectively).</p></li>
 
   <li><p>Next, compile the C file into a LLVM bitcode file:</p>
-      <p><tt>% llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc</tt></p>
+
+      <div class="doc_code">
+      <pre>% llvm-gcc -O3 -emit-llvm hello.c -c -o hello.bc</pre></div>
 
       <p>The -emit-llvm option can be used with the -S or -c options to emit an
          LLVM ".ll" or ".bc" file (respectively) for the code.  This allows you
@@ -1532,11 +1542,11 @@
 
   <li><p>Run the program in both forms. To run the program, use:</p>
       
-      <p><tt>% ./hello</tt></p>
+      <div class="doc_code"><pre>% ./hello</pre></div>
  
       <p>and</p>
 
-      <p><tt>% lli hello.bc</tt></p>
+      <div class="doc_code"><pre>% lli hello.bc</pre></div>
 
       <p>The second examples shows how to invoke the LLVM JIT, <a
        href="CommandGuide/html/lli.html">lli</a>.</p></li>
@@ -1544,21 +1554,28 @@
   <li><p>Use the <tt>llvm-dis</tt> utility to take a look at the LLVM assembly
       code:</p>
 
-      <p><tt>% llvm-dis < hello.bc | less</tt><br><br></li>
+<div class="doc_code">
+<pre>llvm-dis < hello.bc | less</pre>
+</div></li>
 
   <li><p>Compile the program to native assembly using the LLC code
       generator:</p>
 
-      <p><tt>% llc hello.bc -o hello.s</tt></p>
+      <div class="doc_code"><pre>% llc hello.bc -o hello.s</pre></div></li>
 
   <li><p>Assemble the native assembly language file into a program:</p>
 
-      <p><b>Solaris:</b><tt>% /opt/SUNWspro/bin/cc -xarch=v9 hello.s -o hello.native</tt></p>
-      <p><b>Others:</b><tt>% gcc hello.s -o hello.native</tt></p>
+<div class="doc_code">
+<pre>
+<b>Solaris:</b> % /opt/SUNWspro/bin/cc -xarch=v9 hello.s -o hello.native
+
+<b>Others:</b>  % gcc hello.s -o hello.native
+</pre>
+</div></li>
 
   <li><p>Execute the native code program:</p>
 
-      <p><tt>% ./hello.native</tt></p>
+      <div class="doc_code"><pre>% ./hello.native</pre></div>
 
       <p>Note that using llvm-gcc to compile directly to native code (i.e. when
          the -emit-llvm option is not present) does steps 6/7/8 for you.</p>





More information about the llvm-commits mailing list