aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Makefile.target6
-rw-r--r--test/Makefile.tests6
2 files changed, 10 insertions, 2 deletions
diff --git a/test/Makefile.target b/test/Makefile.target
index e95724c2f0..5a77e2a8bd 100644
--- a/test/Makefile.target
+++ b/test/Makefile.target
@@ -52,8 +52,12 @@ ifdef PROG
$(PROG).linked.bc: $(BCOBJS)
$(LLINK) -f $(BCOBJS) -o $@
+ $(PROG).clean.bc: $(PROG).linked.bc
+ $(LOPT) -cleangcc -raise -constprop -dce < $< > $@
+
$(PROG).native: $(OBJS:.o=.c)
gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall -o $@
+
endif
## Special target to force target-dependent library to be compiled
@@ -90,7 +94,7 @@ clean :
%.linked.bc: %.bc
$(CP) $< $@
-%.s: %.linked.bc
+%.s: %.clean.bc
$(LLC) -f $(LLCFLAGS) $< -o $@
%: %.o $(LIBS)
diff --git a/test/Makefile.tests b/test/Makefile.tests
index e95724c2f0..5a77e2a8bd 100644
--- a/test/Makefile.tests
+++ b/test/Makefile.tests
@@ -52,8 +52,12 @@ ifdef PROG
$(PROG).linked.bc: $(BCOBJS)
$(LLINK) -f $(BCOBJS) -o $@
+ $(PROG).clean.bc: $(PROG).linked.bc
+ $(LOPT) -cleangcc -raise -constprop -dce < $< > $@
+
$(PROG).native: $(OBJS:.o=.c)
gcc $(OBJS:.o=.c) -O2 $(LOCAL_CFLAGS) -Wall -o $@
+
endif
## Special target to force target-dependent library to be compiled
@@ -90,7 +94,7 @@ clean :
%.linked.bc: %.bc
$(CP) $< $@
-%.s: %.linked.bc
+%.s: %.clean.bc
$(LLC) -f $(LLCFLAGS) $< -o $@
%: %.o $(LIBS)