Commit Graph

18 Commits

Author SHA1 Message Date
Johnny Chen 53e2edbc5c Simplify lang/objc/self/Makefile, plus it's wrong. :-)
For Makefile.rules, the modification of CFLAGS (addition of -arch $(ARCH) for Darwin) needs to come before
the consuming of CFLAGS, not after.

llvm-svn: 137140
2011-08-09 20:07:16 +00:00
Johnny Chen 189bff103d Fix makefile rules to prevent CFLAGS from appearing twice in the command line.
llvm-svn: 136917
2011-08-04 20:44:56 +00:00
Johnny Chen 19bfde34ed Add a test to check the integrity of the lldb public api directory containing SB*.h headers.
There should be nothing unwanted there and a simpe main.cpp (generated from main.cpp.template)
which includes SB*.h should compile and link with the LLDB framework.

llvm-svn: 136894
2011-08-04 18:17:16 +00:00
Johnny Chen 91016396b9 Change to get around the nested ifeq woes on OS X Snow Leopard:
../make/Makefile.rules:217: *** missing `endif'.  Stop.

llvm-svn: 133466
2011-06-20 20:08:26 +00:00
Peter Collingbourne 518f03d6ba Add Linux rules to test makefile
llvm-svn: 133456
2011-06-20 19:06:04 +00:00
Johnny Chen 1ee61a7f3b Add a test script for exercising the "taregt create", "target list", and "target select" commands.
llvm-svn: 129717
2011-04-18 21:08:05 +00:00
Johnny Chen 8b2c3217fd Minor comment change.
llvm-svn: 124488
2011-01-28 17:22:29 +00:00
Johnny Chen fa38041dac Add makefile debugging rule for printing out the value of a variable.
From http://blog.melski.net/tag/debugging-makefiles/.

Example:

[13:14:59] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-CC
CC=gcc
  origin = file
  flavor = recursive
   value = gcc
[13:15:09] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-LD
LD=  g++
  origin = file
  flavor = recursive
   value = $(call cxx_linker,$(CC))
[13:15:21] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-CXX
CXX=  g++
  origin = file
  flavor = recursive
   value = $(call cxx_compiler,$(CC))
[13:15:29] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $

llvm-svn: 123469
2011-01-14 21:18:12 +00:00
Johnny Chen 6055b44b04 Added comments.
llvm-svn: 123463
2011-01-14 20:55:13 +00:00
Johnny Chen d43e208bb4 Make CC defaults to gcc. The cxx_compiler and cxx_linker functions rely on substituting "g++"
for "gcc".

llvm-svn: 123461
2011-01-14 20:46:49 +00:00
Johnny Chen bdb4efcf17 The cxx_compiler function should not blindly return clang++ as the C++ compiler if $(CC) contains "clang".
Instead, it should perform a textual replacement of $(CC) from "clang" to "clang++".  The same is true
for "llvm-gcc" to "llvm-g++" and for "gcc" to "g++".  This way, we keep the path component of the $(CC)
passed in from the user and do not end up with a mixed toolchains with different paths.

Ditto for a newly added function called cxx_linker.

llvm-svn: 123451
2011-01-14 18:19:53 +00:00
Johnny Chen 92609b52ab Stop using LLDB_CC/LLDB_ARCH in the plugins for test configurations. Use make
friendly CC and ARCH, instead.

llvm-svn: 115169
2010-09-30 17:11:58 +00:00
Johnny Chen 832d2333a5 Added a utility function to return the counterpart C++ compiler of $(CC) and use
it inside Makefile.rules to return clang++ on clang and llvm-g++ on llvm-gcc.

Removed CPLUSPLUSFLAGS which is simply wrong and CPPFLAGS which is unnecessary.

llvm-svn: 115125
2010-09-30 01:22:34 +00:00
Johnny Chen e1030cd883 Added "long long" and "unsigned long long" to the TestBasicTypes.py.
Added a special "clean" target to the types/Makefile to clean up all the *.o/.d
files.

The generic_type_tester() method is modified to take a set of atoms, instead of
type string as a required parameter, for example:

o unsigned int => set(['unsigned', 'int'])
o unsigned long long => set(['unsigned', 'long long'])
o long long => set(['long long'])

llvm-svn: 114871
2010-09-27 20:44:46 +00:00
Johnny Chen 6c17c0807e Added a simple test case to set breakpoints on objc class/instance methods.
Modified Makefile.rules to allow for overwriting the ARCH make variable.

llvm-svn: 114118
2010-09-16 20:54:06 +00:00
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
Johnny Chen e3dc0f048a Generates the .d prerequisite file for dylib as well.
llvm-svn: 111920
2010-08-24 16:35:00 +00:00
Johnny Chen 9bc867aaf5 Makefile refactoring for the test suite. Added a make directory under test,
which hosts the Makefile.rules and modified most of the Makefiles under each
test case directories to utilize Mekefile.rules.

Added a description of 'make' directory into README-TestSuite file.

llvm-svn: 111868
2010-08-23 23:56:08 +00:00