<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>> 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>> 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>> 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>> grep -m 1 llvm_revision $lldb/scripts/build-llvm.pl\r
- <br>our $llvm_revision = "127682";\r
- <br>> cd $clang\r
- <br>> svn update -r 127682\r
- <br>> cd $llvm\r
- <br>> 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’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’s <em>Getting Started Guide</em>. A typical build procedure\r
+ might be:</p>\r
<code>> cd $llvm/..\r
<br>> mkdir build\r
<br>> cd build\r
- <br>> $llvm/configure --enable-targets=x86 --enable-jit --enable-libcpp
- <br>> make CXXFLAGS+=c++11</code>\r
- \r
+ <br>> $llvm/configure --enable-libcpp\r
+ <br>> 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’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>> 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>> 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