diff options
Diffstat (limited to 'www/build.html')
-rwxr-xr-x | www/build.html | 82 |
1 files changed, 38 insertions, 44 deletions
diff --git a/www/build.html b/www/build.html index 787ce6220a2c..7f8a5c9817cd 100755 --- a/www/build.html +++ b/www/build.html @@ -55,16 +55,22 @@ <div class="postcontent"> <h2>Required Dependencies</h2> <ul> - <li>Visual Studio 2012 or greater</li> - <li>Windows SDK 8.0 or higher</li> + <li>Visual Studio 2015 or greater</li> + <li>Windows SDK 8.0 or higher. In general it is best to use the latest available version.</li> <li> - <a href="https://www.python.org/download/releases/2.7/">Python 2.7</a>. Note that you <b>must</b> - compile Python from source. See <a href="#WindowsPreliminaries">Preliminaries</a> for more - information. + <a href="https://www.python.org/downloads/windows/">Python 3.5 or higher</a> or higher. Earlier + versions of Python can be made to work by compiling your own distribution from source, + but this workflow is unsupported and you are own your own. </li> <li><a href="http://martine.github.io/ninja/">Ninja build tool</a> (strongly recommended)</li> <li><a href="http://gnuwin32.sourceforge.net/">GnuWin32</a></li> - <li><a href="http://www.swig.org/download.html">SWIG for Windows</a></li> + <li><a href="http://www.swig.org/download.html">SWIG for Windows (version 3+)</a></li> + </ul> + <h2>Optional Dependencies</h2> + <ul> + <li><a href="https://github.com/Microsoft/PTVS/releases">Python Tools for Visual Studio</a>. If you + plan to debug test failures or even write new tests at all, PTVS is an indispensable debugging extension + to VS that enables full editing and debugging support for Python (including mixed native/managed debugging)</li> </ul> <h2 id="WindowsPreliminaries">Preliminaries</h2> <p> @@ -74,45 +80,13 @@ </p> <ol> <li><p>Install Visual Studio and the Windows SDK.</p></li> - <li> - <p> - Build Python from source using the solution file supplied with the Python 2.7 source - distribution. - </p> - <p> - Because LLDB functionality is compiled into a Python extension module, - the extension module must be compiled with the same version of Visual Studio that - Python itself was compiled with. The binary release of Python 2.7 is compiled with - Visual Studio 2008, so it is incompatible with linking against LLDB. - </p> - <p> - Note that if you plan to do both debug and release builds of LLDB, you will need to - compile both debug and release builds of Python. The same applies if you plan to build - both x86 and x64 configurations of LLDB - </p> - </li> - <li> - <p>Copy <python src dir>\PC\pyconfig.h to <python src dir>\Include.</p> - <p> - This is necessary because pyconfig.h is a hand-maintained file which is platform specific, - so multiple copies of this file are included with each source distribution. It appears to - be up to the person building Python to move the correct version of pyconfig.h to the Include - folder. - </p> - </li> - <li> - <p> - Run lldb/scripts/install_custom_python.py so to "install" your custom build of Python to a - canonical directory structure. - </p> - </li> - <li><p>Install GnuWin32, making sure <GnuWin32 install dir>\bin is added to your PATH environment variable.</p></li> - <li><p>Install SWIG for Windows, making sure <SWIG install dir> is added to your PATH environment variable.</p></li> + <li><p>Install GnuWin32, making sure <code><GnuWin32 install dir>\bin</code> is added to your <code>PATH</code> environment variable.</p></li> + <li><p>Install SWIG for Windows, making sure <code><SWIG install dir></code> is added to your <code>PATH</code> environment variable.</p></li> </ol> <h2>Building LLDB</h2> <p> Any command prompt from which you build LLDB should have a valid Visual Studio environment setup. - This means you should run vcvarsall.bat or open an appropriate Visual Studio Command Prompt + This means you should run <code>vcvarsall.bat</code> or open an appropriate Visual Studio Command Prompt corresponding to the version you wish to use. </p> <p>Finally, when you are ready to build LLDB, generate CMake with the following command line:</p> @@ -130,9 +104,8 @@ a crash, rather than having to reproduce a failure or use a crash dump. </li> <li> - <b>PYTHON_HOME</b> (Required): Path the folder you specified in the --dest argument to install_custom_python.py. - Note that install_custom_python.py will create x86 and x64 subdirectories under this folder. PYTHON_HOME should - refer to the correct architecture-specific folder. + <b>PYTHON_HOME</b> (Required): Path to the folder where the Python distribution is installed. For example, + C:\Python35 </li> <li> <b>LLDB_RELOCATABLE_PYTHON</b> (Default=0): When this is 0, LLDB will bind statically to the location specified @@ -142,7 +115,28 @@ use its default mechanism for finding the python installation at runtime (looking for installed Pythons, or using the PYTHONHOME environment variable if it is specified). </li> + <li> + <b>LLDB_TEST_COMPILER</b>: The test suite needs to be able to find a copy of clang.exe that it can use to compile + inferior programs. Note that MSVC is not supported here, it <strong>must</strong> be a path to a clang executable. + Note that using a release clang.exe is strongly recommended here, as it will make the test suite run much faster. + This can be a path to any recent clang.exe, including one you built yourself. + </li> </ul> + Sample command line:<br/> + <code>cmake -G Ninja -DLLDB_TEST_DEBUG_TEST_CRASHES=1 -DPYTHON_HOME=C:\Python35 -DLLDB_TEST_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe ..\..\llvm</code>
+ <h2>Working with both Ninja and MSVC</h2>
+ <p>
+ Compiling with <code>ninja</code> is both faster and simpler than compiling with MSVC, but chances are you still want
+ to debug LLDB with MSVC (at least until we can debug LLDB on Windows with LLDB!). One solution to this is to run
+ <code>cmake</code> twice and generate the output into two different folders. One for compiling (the <code>ninja</code>
+ folder), and one for editing / browsing / debugging (the MSVC folder).
+ </p>
+ <p>
+ To do this, simply run <code>`cmake -G Ninja <arguments>`</code> from one folder, and
+ <code>`cmake -G "Visual Studio 14 2015" <arguments>`</code> in another folder. Then you can open the .sln file
+ in Visual Studio, set <code>lldb</code> as the startup project, and use F5 to run it. You need only edit the project
+ settings to set the executable and the working directory to point to binaries inside of the <code>ninja</code> tree.
+ </p>
</div> </div> <div class="post" id="BuildingLldbOnMacOSX"> |