Index: lldb/trunk/www/build.html =================================================================== --- lldb/trunk/www/build.html +++ lldb/trunk/www/build.html @@ -36,6 +36,149 @@
+ This section describes how to set up your system and install the required dependencies such that + they can be found when needed during the build process. The steps outlined here only need to + be performed once. +
+Install Visual Studio and the Windows SDK.
+ Build Python from source using the solution file supplied with the Python 2.7 source + distribution. +
++ 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. +
++ 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. +
+Copy <python src dir>\PC\pyconfig.h to <python src dir>\Include.
++ 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. +
+Install GnuWin32, making sure <GnuWin32 install dir>\bin is added to your PATH environment variable.
Install SWIG for Windows, making sure <SWIG install dir> is added to your PATH environment variable.
(Optional) Create a file somewhere on your disk called llvm_env.bat and add the following code to it:
+
+ @ECHO OFF
+ IF "%1" == "build" goto do_build
+ IF "%1" == "dev" goto do_dev
+ ECHO Unknown option, expected "build" or "dev"
+ goto do_end
+ :do_build
+ ECHO Initializing MSVC Build Environment...
+ CALL "c:\Program Files (x86)\Microsoft Visual Studio 12.0\vc\vcvarsall.bat"
+ ECHO Initializing Python environment...
+ set PYTHONPATH=<python src dir>\Lib;<cmake gen dir>\lib\site-packages
+ set PATH=%PATH%;<python src dir>\PCbuild
+ goto do_end
+ :do_dev
+ set PYTHONPATH=
+ goto do_end
+ :do_end
+
+ + (Optional) To make the process of setting up the environment before building more convenient, you can + optionally create a shortcut with the following properties: +
+%windir%\system32\cmd.exe /K <path-to-llvm_env.bat> build
+ + 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 + corresponding to the version you wish to use. Additionally, in order for LLDB to be able to locate + Python to link against, you will need to set up your PYTHONPATH environment variable to contain two + additional values: +
++ The first allows your custom built python installation to locate its system libraries, and + the second allows Python to locate the LLDB extension module. +
++ Steps 6 and 7 of Preliminaries describe a method for simplifying + this setup. +
+Finally, when you are ready to build LLDB, generate CMake with the following command line:
+cmake -G Ninja <cmake variables> <path to root of llvm src tree>
+ and run ninja
to build LLDB, and ninja check-lldb
to run LLDB's test suite.
+ Following is a description of some of the most important CMake variables which you are likely to encounter.
+ A variable FOO
is set by adding -DFOO=value
to the CMake command line.
+
Building on Mac OS X is as easy as downloading the code and building the Xcode project or workspace:
@@ -56,7 +199,7 @@This document describes the steps needed to compile LLDB on most Linux systems, and FreeBSD.
Index: lldb/trunk/www/index.html =================================================================== --- lldb/trunk/www/index.html +++ lldb/trunk/www/index.html @@ -94,7 +94,10 @@(*) Support for Windows is under active development. Basic functionality + is expected to work, with functionality improving rapidly.
Note that LLDB generally builds from top-of-trunk on Mac OS X with - Xcode and on Linux (with clang and libstdc++/libc++).
- +Note that LLDB generally builds from top-of-trunk
+See the LLDB Build Page for platform-specific build instructions.
Discussions about LLDB should go to the lldb-dev mailing list. Commit messages for the lldb SVN module are automatically sent to the lldb-commits