Simplify build instructions

- setting PYTHONPATH is no longer needed to run the lldb CLI on Linux.
- added instructions for setting PYTHONPATH correctly for running scripts in the native interpreter

llvm-svn: 171566
This commit is contained in:
Daniel Malea 2013-01-05 00:16:08 +00:00
parent 2aaec89fd0
commit 1e6764b485
1 changed files with 10 additions and 10 deletions

View File

@ -124,16 +124,16 @@
<p> If you wish to build a release version of LLDB, run configure with the <tt>--enable-optimized</tt> flag.</p> <p> If you wish to build a release version of LLDB, run configure with the <tt>--enable-optimized</tt> flag.</p>
<h2>Additional Notes</h2> <h2>Additional Notes</h2>
<p>LLDB has a Python scripting capability and supplies its own Python module, <p>LLDB has a Python scripting capability and supplies its own Python module named <tt>lldb</tt>.
<tt>lldb</tt>, built alongside the <tt>lldb</tt> binary. Python needs to know where to If a script is run inside the command line <tt>lldb</tt> application, the Python module
look for this module when LLDB starts up. To tell Python the location of LLDB, set is made available automatically. However, if a script is to be run by a Python interpreter
<tt>PYTHONPATH</tt> environment variable. outside the command line application, the <tt>PYTHONPATH</tt> environment variable can be used
<p>In bash with a <tt>Debug+Asserts</tt> build (the default if configure is invoked to let the Python interpreter find the <tt>lldb</tt> module.
like in the example on this page) one might run:</p> <p>The correct path can be obtained by invoking the command line <tt>lldb</tt> tool with the -P flag:</p>
<code>&gt; export PYTHONPATH=$llvm/build/Debug+Asserts/lib/python2.7/site-packages</code> <code>&gt; export PYTHONPATH=`$llvm/build/Debug+Asserts/bin/lldb -P`</code>
<p>If you used a different build directory, made a release build, or have a different version of <p>If you used a different build directory or made a release build, you may need to adjust the
Python, you may need to adjust the above to suit your needs. To test that the lldb Python module above to suit your needs. To test that the lldb Python module
is built correctly and is available to Python, run:</p> is built correctly and is available to the default Python interpreter, run:</p>
<code>&gt; python -c 'import lldb'</code></p> <code>&gt; python -c 'import lldb'</code></p>
</div> </div>
<div class="postfooter"></div> <div class="postfooter"></div>