aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-20 21:03:34 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-20 21:03:34 +0000
commit150e8422efd2a6db6d1057b0cd6d72f0378dc15a (patch)
tree1b1bed5f7e57496052f8afb409e461a780f2a65c /projects
parent08602e5a3059d00a302edbdaf4a530e3c86bbf8b (diff)
Use llvmc to compile test cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'projects')
-rw-r--r--projects/Stacker/test/Makefile29
1 files changed, 11 insertions, 18 deletions
diff --git a/projects/Stacker/test/Makefile b/projects/Stacker/test/Makefile
index 1629de39d4..aa349c1e90 100644
--- a/projects/Stacker/test/Makefile
+++ b/projects/Stacker/test/Makefile
@@ -31,37 +31,30 @@ IO_TESTS = space tab out_chr out_num out_str
TESTS = $(LOGIC_TESTS) $(ARITHMETIC_TESTS) $(BITWISE_TESTS) $(STACK_TESTS) \
$(MEMORY_TESTS) $(CONTROL_TESTS) $(IO_TESTS)
-STKRC_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/stkrc
+LLVMC = $(LLVMToolDir)/llvmc
all :: test_each
test_each: $(TESTS)
$(Echo) "Running Tests..."
- $(Verb) LD_LIBRARY_PATH=$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) $(BUILD_SRC_DIR)/runtests $(BUILD_OBJ_DIR) $(TESTS)
+ $(Verb) LD_LIBRARY_PATH=$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) \
+ $(BUILD_SRC_DIR)/runtests $(BUILD_OBJ_DIR) $(TESTS)
-%.bc : %.st Makefile
- $(Echo) "Compiling And Optimizing $< to $*.bc"
- $(Verb)$(STKRC_EXEC) -f -O4 -s 2048 -o $*.bc $(BUILD_SRC_DIR)/$*.st
+% : %.st Makefile testing.bc
+ $(Echo) "Building $*"
+ $(Verb)$(LLVMC) -O4 -o $@ $< testing.bc -lstkr_runtime -lcrtend
-%.s : %.bc testing.bc
- $(Echo) "Assembling $< to $*.s"
- $(Verb)$(LLINK) $*.bc testing.bc -o $*.bcl
- $(Verb)$(LLC) -f -o $*.s $*.bcl
-
-% : %.s
- $(Echo) "Linking $*"
- $(Verb)$(CC) -ggdb -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) -lstkr_runtime -o $* $*.s
-
-%.ll : %.bc
- $(Echo) "Disassembling $< to $*.ll"
- $(Verb)$(LDIS) -dis -o $*.ll $<
+testing.bc : testing.st Makefile
+ $(Echo) "Compiling $*"
+ $(Verb)$(LLVMC) -O3 -c -o $@ $<
TESTS_LL = $(TESTS:%=%.ll)
TESTS_BC = $(TESTS:%=%.bc)
TESTS_S = $(TESTS:%=%.s)
clean ::
- $(Verb)rm -f gmon.out $(TESTS_LL) $(TESTS_BC) $(TESTS_S) $(TESTS) testing.bc testing.s testing.ll
+ $(Verb)rm -f gmon.out $(TESTS_LL) $(TESTS_BC) $(TESTS_S) $(TESTS) \
+ testing.bc testing.s testing.ll
.SUFFIXES: .st .s .ll .bc
.PRECIOUS: %.s %.ll %.bc %.st