<commit_before>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.
<commit_msg>Test commit<commit_after>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.


{'fraction_non_alphanumeric': 0.08277063820518406, 'fraction_numerical': 0.011326508385972555, 'mean_word_length': 3.5510406342913776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4917659', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1481, 'n_words': 661}