[llvm-commits] CVS: llvm-java/test/Makefile.test
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sun Feb 27 02:22:25 PST 2005
Changes in directory llvm-java/test:
Makefile.test updated: 1.40 -> 1.41
---
Log message:
Add rules to compile native code using llc as well.
---
Diffs of the changes: (+24 -6)
Makefile.test | 30 ++++++++++++++++++++++++------
1 files changed, 24 insertions(+), 6 deletions(-)
Index: llvm-java/test/Makefile.test
diff -u llvm-java/test/Makefile.test:1.40 llvm-java/test/Makefile.test:1.41
--- llvm-java/test/Makefile.test:1.40 Fri Feb 11 17:19:21 2005
+++ llvm-java/test/Makefile.test Sun Feb 27 04:22:13 2005
@@ -31,6 +31,13 @@
-$(Verb)$(LOPT) -load $(LibDir)/LLVMJavaTransforms -addstubs -f -o=$*.stubbed.raw.llvm.bc $*.raw.llvm.bc
-$(Verb)$(MV) -f $*.stubbed.raw.llvm.bc $*.raw.llvm.bc
+# rule to make native executable
+%.llc.s: %.llvm.bc
+ -$(Verb)$(LLC) -f $< -o $@
+
+%.llc: %.llc.s
+ -$(Verb)$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
+
# add function trace code
%.tracef.llvm %.tracef.llvm.bc: %.llvm %.llvm.bc $(LOPT)
$(Echo) Adding function trace code to $<
@@ -61,12 +68,14 @@
# Output produced by tests
NATIVE_OUTPUT := $(addsuffix .out-nat, $(PREFIXED_JAVA_TESTS))
JIT_OUTPUT := $(addsuffix .out-jit, $(PREFIXED_JAVA_TESTS))
+LLC_OUTPUT := $(addsuffix .out-llc, $(PREFIXED_JAVA_TESTS))
# Diffs of output produced by native and llvm-java runs
-DIFFS := $(addsuffix .diff, $(PREFIXED_JAVA_TESTS))
+JIT_DIFFS := $(addsuffix .diff-jit, $(PREFIXED_JAVA_TESTS))
+JIT_DIFFS := $(addsuffix .diff-llc, $(PREFIXED_JAVA_TESTS))
# Keep the output and diffs
-.PRECIOUS: %.out-nat %.out-jit %.diff
+.PRECIOUS: %.out-nat %.out-jit %.out-llc %.diff-jit %.diff-llc
# rule to run a .class file with the jvm
%.out-nat: %.class
@@ -77,12 +86,21 @@
%.out-jit: %.llvm.bc
-$(Verb)$(LLI) $< > $*.out-jit 2>&1
+# rule to run a .class file with llc
+%.out-llc: %.llc
+ -$(Verb)./$< > $*.out-llc 2>&1
+
# rule to diff test output
-%.diff: %.out-nat %.out-jit
+%.diff-jit: %.out-nat %.out-jit
$(Verb)diff $*.out-nat $*.out-jit > $@ \
- && echo "PASS: $(notdir $*)" \
- || echo "FAIL: $(notdir $*)"
+ && echo "PASS(jit): $(notdir $*)" \
+ || echo "FAIL(jit): $(notdir $*)"
+
+%.diff-llc: %.out-nat %.out-llc
+ $(Verb)diff $*.out-nat $*.out-llc > $@ \
+ && echo "PASS(llc): $(notdir $*)" \
+ || echo "FAIL(llc): $(notdir $*)"
-all-local:: $(DIFFS)
+all-local:: $(JIT_DIFFS) $(LLC_DIFFS)
endif
More information about the llvm-commits
mailing list