[Lldb-commits] [lldb] r119679 - /lldb/trunk/docs/building-with-debug-llvm.txt

Sean Callanan scallanan at apple.com
Wed Nov 17 19:56:18 PST 2010


Author: spyffe
Date: Wed Nov 17 21:56:17 2010
New Revision: 119679

URL: http://llvm.org/viewvc/llvm-project?rev=119679&view=rev
Log:
Instructions for building LLDB with a debug LLVM
build under Xcode.

Added:
    lldb/trunk/docs/building-with-debug-llvm.txt

Added: lldb/trunk/docs/building-with-debug-llvm.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/building-with-debug-llvm.txt?rev=119679&view=auto
==============================================================================
--- lldb/trunk/docs/building-with-debug-llvm.txt (added)
+++ lldb/trunk/docs/building-with-debug-llvm.txt Wed Nov 17 21:56:17 2010
@@ -0,0 +1,50 @@
+This document describes how to build a debug version of LLVM for use with
+LLDB, and how to make LLDB use it.  
+
+It assumes that you are using the Xcode 3 series (I used 3.2.4) to build 
+LLDB.  It also assumes that your shell is /bin/bash, and that you are
+currently at a shell prompt in a checked-out LLDB repository.
+
+1.	Check out LLVM and Clang from their repositories.  To determine
+	the revision to use, consult scripts/build-llvm.pl (this is done
+	in the first command line below).  !!! WARNING Do not use the
+	name "llvm" for your checkout, for reasons described in part 3
+	below.
+
+	$ export CLANG_REVISION=`cat scripts/build-llvm.pl | grep ^our.*llvm_revision | cut -d \' -f 2,2`
+	$ svn co -r $CLANG_REVISION http://llvm.org/svn/llvm-project/llvm/trunk llvm.checkout
+	$ svn co -r $CLANG_REVISION http://llvm.org/svn/llvm-project/cfe/trunk llvm.checkout/tools/clang
+
+2.	Configure LLVM/Clang with the proper options and compilers.  I use:
+
+	$ cd llvm.checkout
+	$ CC="cc -g -O0" CXX="c++ -g -O0" ./configure --disable-optimized --enable-assertions --enable-targets=x86_64,arm
+	$ CC="cc -g -O0" CXX="c++ -g -O0" make -j 2
+	$ cd ..
+
+3.	Create a link to the built LLVM.  !!! WARNING: Do not rename the
+	directory!  The LLVM builder script that runs as part of the Xcode
+	build keys off the fact that llvm/ is a symlink to recognize that
+	we are building with a custom debug build.
+
+	$ ln -sf llvm.checkout llvm
+
+4.	Make sure that your Xcode project is set up correctly.  Open
+	lldb.xcodeproj and do the following:
+
+	Under "Targets" in the Groups & Files navigator, double-click
+	lldb-tool.  In the resulting window, select "Debug" from the
+	"Configuration:" drop-down.  Then, make sure that the setting
+	"Build Active Architecture Only" is enabled.  Close the window.
+
+	Under "Targets" in the Groups & Files navigator, double-click
+	LLDB.  In the resulting window, select "Debug" from the
+	"Configuration:" drop-down.  Then, make sure that the setting
+	"Build Active Architecture Only" is enabled.  Close the window.
+
+5.	Ensure that Xcode is building the lldb-tool target in Debug 
+	configuration for your architecture (typically x86_64).  You
+	can usually pick these options from the Overview drop-down at
+	the top left of the Xcode window.
+
+6.	Build lldb.xcodeproj.
\ No newline at end of file





More information about the lldb-commits mailing list