Patch from Daniel Malea -- Updated build instructions for Linux.
authorGreg Clayton <gclayton@apple.com>
Mon, 15 Oct 2012 20:39:39 +0000 (20:39 +0000)
committerGreg Clayton <gclayton@apple.com>
Mon, 15 Oct 2012 20:39:39 +0000 (20:39 +0000)
llvm-svn: 165964

lldb/www/build.html

index 4cd0e72..aaba083 100755 (executable)
                     <li><a href="http://www.thrysoee.dk/editline">libedit</a></li>\r
                     <li><a href="http://www.python.org">Python</a></li>\r
                 </ul>\r
-                <p>So for example, on a Fedora system one might say:</p>\r
+                <p>So for example, on a Fedora system one might run:</p>\r
                 <code>&gt; yum install swig python-devel libedit-devel</code>\r
-                <p>If building using GCC instead of Clang, GCC 4.6.2 or newer is recommended.</p>\r
+                <p>On an Ubuntu system one might run:</p>\r
+                <code>&gt; sudo apt-get install swig python-dev libedit-dev </code>\r
+                <p>If building using GCC instead of Clang, GCC 4.6.2 or newer is required.</p>\r
                 <ul>\r
                     <li><a href="http://gcc.gnu.org">GCC</a></li>\r
                 </ul>\r
                 <br>&gt; svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb\r
                 </code>\r
                 \r
-                <p>In general, LLDB requires specific revisions of both LLVM and Clang in order to\r
-                build.  This requirement insulates LLDB a bit from the constant development\r
-                happening in both of these projects.  The required revision can be discovered by\r
-                consulting the Perl script <tt>$lldb/scripts/build-llvm.pl</tt> and locating the\r
-                <tt>$llvm_revision</tt> variable.  At the time of this writing, the required revision\r
-                is <tt>r127682</tt>, so we might check and revert our LLVM and Clang trees to the\r
-                required state as follows:</p>\r
-                <code>&gt; grep -m 1 llvm_revision $lldb/scripts/build-llvm.pl\r
-                  <br>our $llvm_revision = "127682";\r
-                  <br>&gt; cd $clang\r
-                  <br>&gt; svn update -r 127682\r
-                  <br>&gt; cd $llvm\r
-                  <br>&gt; svn update -r 127682</code>\r
-                \r
+                <p>In general, building the LLDB trunk revision requires trunk revisions of both \r
+                LLVM and Clang.\r
                 <p>It is highly recommended that you build the system out of tree.  Create a second\r
                 build directory and configure the LLVM project tree to your specifications as\r
-                outlined in LLVM&#8217;s <em>Getting Started Guide</em>.  For Linux development the x86\r
-                backend and JIT compiler should be enabled.  A typical build procedure might be:</p>\r
+                outlined in LLVM&#8217;s <em>Getting Started Guide</em>.  A typical build procedure\r
+                might be:</p>\r
                 <code>&gt; cd $llvm/..\r
                   <br>&gt; mkdir build\r
                   <br>&gt; cd build\r
-                  <br>&gt; $llvm/configure --enable-targets=x86 --enable-jit --enable-libcpp
-                  <br>&gt; make CXXFLAGS+=c++11</code>\r
-                \r
+                  <br>&gt; $llvm/configure --enable-libcpp\r
+                  <br>&gt; make CXXFLAGS=-std=c++11</code>\r
                 <p>Note that once both LLVM and Clang have been configured and built it is not\r
                 necessary to perform a top-level <tt>make</tt> to rebuild changes made only to LLDB.\r
-                You can build from the <tt>build/tools/lldb</tt> subdirectory as well. If your
-                compiler doesn't support c++11 or libc++, you may need to tweak or remove the last
-                parameter to the configure script and make command.</p>
+                You can run <tt>make</tt> from the <tt>build/tools/lldb</tt> subdirectory as well. If your\r
+                compiler doesn't support libc++, you may need to tweak or remove the last\r
+                parameter to the configure script.</p>\r
                 \r
                 <h2>Additional Notes</h2>\r
                 <p>LLDB has a Python scripting capability and supplies it&#8217;s own Python module,\r
-                <tt>lldb.py</tt>, built alongside the <tt>lldb</tt> binary.  Python needs to know where to\r
-                look for this module when LLDB starts up.  There are two options available:</p>\r
-                <ol class="arabic">\r
-                <li>\r
-                    <p>Keep a copy of <tt>lldb.py</tt> in the current working directory when starting lldb.</p>\r
-                </li>\r
-                <li>\r
-                    <p>Set <tt>PYTHONPATH</tt> to point to the directory holding <tt>lldb.py</tt>.</p>\r
-                </li>\r
-                </ol>\r
+                <tt>lldb</tt>, built alongside the <tt>lldb</tt> binary.  Python needs to know where to\r
+                look for this module when LLDB starts up.  To tell python the location of LLDB, set\r
+                <tt>PYTHONPATH</tt> environment variable.\r
+                <p>In bash with a <tt>Debug+Asserts</tt> build (the default if configure is invoked\r
+                like in the example on this page) one might run:</p>\r
+                <code>&gt; export PYTHONPATH=$llvm/build/Debug+Asserts/lib/python2.7/site-packages</code>\r
+                <p>If you used different configure flags, or have a different version of python,\r
+                you may need to adjust the above to suit your needs. To test that the lldb python module\r
+                is built correctly and is available to Python, run:</p>\r
+                <code>&gt; python -c 'import lldb'</code></p>\r
                 </div>\r
                <div class="postfooter"></div>\r
                </div>\r
        </div>\r
 </div>\r
 </body>\r
-</html>
+</html>\r