[Lldb-commits] [PATCH] D50362: Add instructions for building LLDB on Mac OS X with CMake
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 7 10:34:52 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB339155: Add instructions for building LLDB on Mac OS X with CMake (authored by xiaobai, committed by ).
Changed prior to commit:
@@ -143,21 +143,42 @@
<div class="post" id="BuildingLldbOnMacOSX">
<h1 class="postheader">Building LLDB on Mac OS X</h1>
- <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
<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>
- <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>
<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>
+ <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>
+ > cmake $PATH_TO_LLVM -G Ninja
+ <br />> 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.
+ <p>Here are some commonly used LLDB-specific CMake variables:</p>
+ <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>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3189 bytes
Desc: not available
More information about the lldb-commits