Index: lldb/trunk/www/build.html =================================================================== --- lldb/trunk/www/build.html +++ lldb/trunk/www/build.html @@ -36,6 +36,149 @@
+

Building LLDB

+ +
+
+
+

Building LLDB on Windows

+
+

Required Dependencies

+ +

Preliminaries

+

+ 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. +

+
    +
  1. Install Visual Studio and the Windows SDK.

  2. +
  3. +

    + 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. +

    +
  4. +
  5. +

    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. +

    +
  6. +
  7. Install GnuWin32, making sure <GnuWin32 install dir>\bin is added to your PATH environment variable.

  8. +
  9. Install SWIG for Windows, making sure <SWIG install dir> is added to your PATH environment variable.

  10. +
  11. +

    (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
    +
    +
  12. +
  13. +

    + (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 +
  14. +
+

Building LLDB

+

+ 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: +

+
    +
  1. <python src dir>\Lib
  2. +
  3. <folder where CMake build files are generated>\lib\site-packages
  4. +
+

+ 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 LLDB on Mac OS X

Building on Mac OS X is as easy as downloading the code and building the Xcode project or workspace:

@@ -56,7 +199,7 @@
-
+

Building LLDB on Linux and FreeBSD

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 @@
  • iOS device debugging on ARM
  • Linux local user-space debugging for i386 and x86-64
  • FreeBSD local user-space debugging for i386 and x86-64
  • +
  • Windows local user-space debugging for i386 (*)
  • +

    (*) Support for Windows is under active development. Basic functionality + is expected to work, with functionality improving rapidly.

    @@ -110,9 +113,13 @@
  • svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
  • -

    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