llvm-project/lldb
Johnny Chen 1394a4b715 Extend the build mechanism to allow for specifying the compiler used to build
the binaries.

If the build* function is passed the compiler argument, for example, 'llvm-gcc',
it is passed as a make variable to the make command.  Otherwise, we check the
LLDB_CC environment variable; if it is defined, it is passed as a make variable
to the make command.

If neither the compiler keyword argument nor the LLDB_CC environment variable is
specified, no CC make variable is passed to the make command.  The Makefile gets
to define the default CC being used.

--------------------------------------------------------------------------------
Example usage follows:

o Via the keyword argument:

class ArrayTypesTestCase(TestBase):

    mydir = "array_types"

    @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
    def test_with_dsym_and_run_command(self):
        """Test 'frame variable var_name' on some variables with array types."""
        self.buildDsym(compiler='llvm-gcc')
        self.array_types()
...

o Via LLDB_CC environment variable:

$ LLDB_CC=llvm-gcc ./dotest.py -v -t array_types
----------------------------------------------------------------------
Collected 4 tests

test_with_dsym_and_python_api (TestArrayTypes.ArrayTypesTestCase)
Use Python APIs to inspect variables with array types. ... 
os command: [['/bin/sh', '-c', 'make clean; make MAKE_DSYM=YES CC=llvm-gcc']]
output: rm -rf "a.out" "a.out.dSYM"  main.o main.d
llvm-gcc -arch x86_64 -gdwarf-2 -O0 -arch x86_64 -gdwarf-2 -O0  -c -o main.o main.c
llvm-gcc -arch x86_64 -gdwarf-2 -O0  main.o -o "a.out"
/usr/bin/dsymutil  -o "a.out.dSYM" "a.out"

...

llvm-svn: 113781
2010-09-13 20:54:30 +00:00
..
docs Minor copy edits. 2010-09-11 00:37:21 +00:00
examples/lookup Added some missing API for address resolving within a module, and looking 2010-09-10 18:31:35 +00:00
include Added the summary values for function pointers so we can show where they 2010-09-13 03:32:57 +00:00
lib Patch from Jay Cornwall that modifies the LLDB "Host" layer to reuse more 2010-09-07 20:11:56 +00:00
lldb.xcodeproj Fixed a crash that would happen when using "frame variables" on any struct, 2010-09-12 23:17:56 +00:00
resources Initial checkin of lldb code from internal Apple repo. 2010-06-08 16:52:24 +00:00
scripts o Exposed SBFileSpec to the Python APIs in lldb.py. 2010-08-27 22:35:26 +00:00
source Clean up help text. 2010-09-13 05:27:16 +00:00
test Extend the build mechanism to allow for specifying the compiler used to build 2010-09-13 20:54:30 +00:00
tools If the file the user specifies can't be found in the current directory, 2010-09-10 04:48:55 +00:00
www Fix utilities text 2010-06-12 03:34:21 +00:00
INSTALL.txt You'll need to be running Mac OS X to get lldb to build right now. 2010-06-09 07:29:26 +00:00
LICENSE.TXT test commit 2010-06-09 03:55:24 +00:00
Makefile Comment out test targets; they don't work on Linux because test/Makefile uses 2010-07-09 22:36:15 +00:00