[llvm-commits] [test-suite] r59769 - in /test-suite/trunk: Makefile.rules Makefile.tests SingleSource/Makefile.singlesrc
Daniel Dunbar
daniel at zuster.org
Thu Nov 20 17:00:42 PST 2008
Author: ddunbar
Date: Thu Nov 20 19:00:41 2008
New Revision: 59769
URL: http://llvm.org/viewvc/llvm-project?rev=59769&view=rev
Log:
Teach test-suite how to build Objective-C[++] programs.
- A little hacky as this just assumes that the C and C++ compilers
can build Objective-C but I don't anticipate this being a problem
for platforms we would use this on.
Modified:
test-suite/trunk/Makefile.rules
test-suite/trunk/Makefile.tests
test-suite/trunk/SingleSource/Makefile.singlesrc
Modified: test-suite/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=59769&r1=59768&r2=59769&view=diff
==============================================================================
--- test-suite/trunk/Makefile.rules (original)
+++ test-suite/trunk/Makefile.rules Thu Nov 20 19:00:41 2008
@@ -437,7 +437,7 @@
ifndef Source
Source := $(notdir $(ExtraSource) $(wildcard $(SourceDir)/*.cpp \
$(SourceDir)/*.cc $(SourceDir)/*.c $(SourceDir)/*.y \
- $(SourceDir)/*.l))
+ $(SourceDir)/*.l $(SourceDir)/*.m $(SourceDir)/*.mm))
endif
#
Modified: test-suite/trunk/Makefile.tests
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.tests?rev=59769&r1=59768&r2=59769&view=diff
==============================================================================
--- test-suite/trunk/Makefile.tests (original)
+++ test-suite/trunk/Makefile.tests Thu Nov 20 19:00:41 2008
@@ -61,6 +61,16 @@
-$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
-$(call UPGRADE_LL,$@)
+# Compile from X.m to Output/X.bc
+Output/%.bc: %.m $(LCC1) Output/.dir $(INCLUDES)
+ -$(LLVMGCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(call UPGRADE_LL,$@)
+
+# Compile from X.mm to Output/X.bc
+Output/%.bc: %.mm $(LCC1XX) Output/.dir $(INCLUDES)
+ -$(LLVMGXX) $(CPPFLAGS) $(CXXFLAGS) $(LOPTFLAGS) $(TARGET_FLAGS) -c $< -o $@ -emit-llvm
+ -$(call UPGRADE_LL,$@)
+
# LLVM Assemble from X.ll to Output/X.bc. Because we are coming directly from
# LLVM source, use the non-transforming assembler.
#
@@ -74,3 +84,6 @@
%.o: %.c
+%.o: %.m
+
+%.o: %.mm
Modified: test-suite/trunk/SingleSource/Makefile.singlesrc
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Makefile.singlesrc?rev=59769&r1=59768&r2=59769&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/Makefile.singlesrc (original)
+++ test-suite/trunk/SingleSource/Makefile.singlesrc Thu Nov 20 19:00:41 2008
@@ -30,6 +30,12 @@
Output/%.LOC.txt: $(SourceDir)/%.cpp
cat $< | wc -l > $@
+
+Output/%.LOC.txt: $(SourceDir)/%.m
+ cat $< | wc -l > $@
+
+Output/%.LOC.txt: $(SourceDir)/%.mm
+ cat $< | wc -l > $@
endif
# FIXME: LIBS should be specified, not hardcoded to -lm
@@ -39,6 +45,11 @@
Output/%.native: $(SourceDir)/%.cpp Output/.dir
-$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(OPTFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $(LDFLAGS)
+Output/%.native: $(SourceDir)/%.m Output/.dir
+ -$(CC) $(CPPFLAGS) $(CFLAGS) $(OPTFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $(LDFLAGS)
+
+Output/%.native: $(SourceDir)/%.mm Output/.dir
+ -$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(OPTFLAGS) $(TARGET_FLAGS) $< -lm -o $@ $(LDFLAGS)
bugpoint-gccas bugpoint-opt bugpoint-llvm-ld bugpoint-gccld bugpoint-jit bugpoint-llc bugpoint-llc-beta:
@echo "The $@ target doesn't work in SingleSource. Try:"
More information about the llvm-commits
mailing list