aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-11-18 03:56:17 +0000
committerSean Callanan <scallanan@apple.com>2010-11-18 03:56:17 +0000
commit1069175fade5e50264026163cfab108357b2d53b (patch)
treecbf0004245c6741bd748a3ff27e63082492ec029 /docs
parent8a3b0a85dd512824f528cfa55d93f530ebe38be8 (diff)
downloadlldb-1069175fade5e50264026163cfab108357b2d53b.tar.gz
Instructions for building LLDB with a debug LLVM
build under Xcode. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/building-with-debug-llvm.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/building-with-debug-llvm.txt b/docs/building-with-debug-llvm.txt
new file mode 100644
index 000000000..ba49bbac3
--- /dev/null
+++ b/docs/building-with-debug-llvm.txt
@@ -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