[Lldb-commits] [lldb] r339155 - Add instructions for building LLDB on Mac OS X with CMake
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 7 10:34:13 PDT 2018
Author: xiaobai
Date: Tue Aug 7 10:34:13 2018
New Revision: 339155
URL: http://llvm.org/viewvc/llvm-project?rev=339155&view=rev
Log:
Add instructions for building LLDB on Mac OS X with CMake
Summary:
There were previously no instructions for building LLDB on Mac OS X
with CMake. It's sufficiently close to building on Linux/FreeBSD/NetBSD that a
well-motivated developer could figure out the steps themselves. However, having
an explicit guide is better and can provide Mac OS X specific configurations
(e.g. LLDB_BUILD_FRAMEWORK).
Reviewers: labath, clayborg
Subscribers: emaste, krytarowski
Differential Revision: https://reviews.llvm.org/D50362
Modified:
lldb/trunk/www/build.html
Modified: lldb/trunk/www/build.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/build.html?rev=339155&r1=339154&r2=339155&view=diff
==============================================================================
--- lldb/trunk/www/build.html (original)
+++ lldb/trunk/www/build.html Tue Aug 7 10:34:13 2018
@@ -143,7 +143,7 @@
<div class="post" id="BuildingLldbOnMacOSX">
<h1 class="postheader">Building LLDB on Mac OS X</h1>
<div class="postcontent">
- <p>Building on Mac OS X is as easy as downloading the code and building the Xcode project or workspace:</p>
+ <p> There are two ways to build LLDB on Mac OS X: Using Xcode and using CMake
</div>
<div class="postcontent">
<h2>Preliminaries</h2>
@@ -151,13 +151,34 @@
<li>XCode 4.3 or newer requires the "Command Line Tools" component (XCode->Preferences->Downloads->Components).</li>
<li>Mac OS X Lion or newer requires installing <a href="http://swig.org">Swig</a>.</li>
</ul>
- <h2>Building LLDB</h2>
+ <h2>Building LLDB with Xcode</h2>
+ <p>Building on Mac OS X with Xcode is as easy as downloading the code and building the Xcode project or workspace:</p>
<ul>
<li><a href="download.html">Download</a> the lldb sources.</li>
<li>Follow the code signing instructions in <b>lldb/docs/code-signing.txt</b></li>
<li>In Xcode 3.x: <b>lldb/lldb.xcodeproj</b>, select the <b>lldb-tool</b> target, and build.</li>
<li>In Xcode 4.x: <b>lldb/lldb.xcworkspace</b>, select the <b>lldb-tool</b> scheme, and build.</li>
</ul>
+ <h2>Building LLDB with CMake</h2>
+ <p> First download the LLVM, Clang, and LLDB sources. Refer to <a href="source.html">this page</a> for precise instructions on this step.</p>
+ <p> Refer to the code signing instructions in <b>lldb/docs/code-signing.txt</b> for info on codesigning debugserver during the build.</p>
+ <p> Using CMake is documented on the <a href="http://llvm.org/docs/CMake.html">Building LLVM with CMake</a> page.
+ Ninja is the recommended generator to use when building LLDB with CMake.</p>
+ <code>
+ > cmake $PATH_TO_LLVM -G Ninja
+ <br />> ninja lldb
+ </code>
+ <p>
+ 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.
+ </p>
+ <p>Here are some commonly used LLDB-specific CMake variables:</p>
+ <ul>
+ <li><code><b>LLDB_EXPORT_ALL_SYMBOLS</b>:BOOL </code>: Exports all symbols. Useful in conjunction with CMAKE_BUILD_TYPE=Debug.</li>
+ <li><code><b>LLDB_BUILD_FRAMEWORK</b>:BOOL </code>: Builds LLDB.framework as Xcode would</li>
+ <li><code><b>LLDB_CODESIGN_IDENTITY</b>:STRING </code>: Determines the codesign identity to use. An empty string means skip building debugserver to avoid codesigning.</li>
+ </ul>
</div>
<div class="postfooter"></div>
</div>
More information about the lldb-commits
mailing list