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:
+There are two ways to build LLDB on Mac OS X: Using Xcode and using CMake
Preliminaries
@@ -151,13 +151,34 @@Building LLDB
+Building LLDB with Xcode
+Building on Mac OS X with Xcode is as easy as downloading the code and building the Xcode project or workspace:
- Download the lldb sources.
- Follow the code signing instructions in lldb/docs/code-signing.txt
- In Xcode 3.x: lldb/lldb.xcodeproj, select the lldb-tool target, and build.
- In Xcode 4.x: lldb/lldb.xcworkspace, select the lldb-tool scheme, and build.
Building LLDB with CMake
+First download the LLVM, Clang, and LLDB sources. Refer to this page for precise instructions on this step.
+Refer to the code signing instructions in lldb/docs/code-signing.txt for info on codesigning debugserver during the build.
+Using CMake is documented on the Building LLVM with CMake page. + Ninja is the recommended generator to use when building LLDB with CMake.
+
+ > cmake $PATH_TO_LLVM -G Ninja
+
> ninja lldb
+
+ + As noted in the "Building LLVM with CMake" page mentioned above, you can pass + variables to cmake to change build behavior. If LLDB is built as a part of LLVM, + then you can pass LLVM-specific CMake variables to cmake when building LLDB. +
+Here are some commonly used LLDB-specific CMake variables:
+-
+
LLDB_EXPORT_ALL_SYMBOLS:BOOL
: Exports all symbols. Useful in conjunction with CMAKE_BUILD_TYPE=Debug.
+ LLDB_BUILD_FRAMEWORK:BOOL
: Builds LLDB.framework as Xcode would
+ LLDB_CODESIGN_IDENTITY:STRING
: Skips building debugserver and therefore avoids codesigning anything.
+