[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
Mon Aug 6 14:47:54 PDT 2018


xiaobai updated this revision to Diff 159400.
xiaobai added a comment.

Reducing redundancy and changing some wording around.


https://reviews.llvm.org/D50362

Files:
  www/build.html


Index: www/build.html
===================================================================
--- www/build.html
+++ www/build.html
@@ -143,21 +143,42 @@
         <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>
             <ul>
               <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>: Skips building debugserver and therefore avoids codesigning anything.</li>
+            </ul>
           </div>
           <div class="postfooter"></div>
         </div>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50362.159400.patch
Type: text/x-patch
Size: 3148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180806/5476e617/attachment.bin>


More information about the lldb-commits mailing list