Commit 2eafc343 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Switched to LLVM 3.4

parent 2a894918
...@@ -6,20 +6,20 @@ BFILES := $(patsubst %.b,%,$(wildcard *.b)) ...@@ -6,20 +6,20 @@ BFILES := $(patsubst %.b,%,$(wildcard *.b))
.PRECIOUS: $(addsuffix .ll,$(BFILES)) $(addsuffix -opt.ll,$(BFILES)) .PRECIOUS: $(addsuffix .ll,$(BFILES)) $(addsuffix -opt.ll,$(BFILES))
bf: bf.ml bf: bf.ml
ocamlopt -o $@ -g -I /usr/lib/ocaml/llvm-3.5 llvm.cmxa $< ocamlopt -o $@ -g -I /usr/lib/ocaml/llvm-3.4 llvm.cmxa $<
rm -f $@.cmi $@.cmx $@.o rm -f $@.cmi $@.cmx $@.o
%: %.o %: %.o
$(LD) -o $@ $< $(LDFLAGS) $(LD) -o $@ $< $(LDFLAGS)
%.o: %.ll %.o: %.ll
llc-3.5 -filetype obj -o $@ $< llc -filetype obj -o $@ $<
%.ll: %.bc %.ll: %.bc
llvm-dis-3.5 -o $@ $< llvm-dis -o $@ $<
%-opt.ll: %.ll %-opt.ll: %.ll
opt-3.5 -O3 -S -o $@ $< opt -O3 -S -o $@ $<
%.ll: %.b bf %.ll: %.b bf
./bf < $< > $@ ./bf < $< > $@
......
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
make -s bf make -s bf
./bf | opt-3.5 -O3 -o prog.bc ./bf | opt -O3 -o prog.bc
make -s prog make -s prog
./prog ./prog
rm -f prog{,.bc,.o} rm -f prog{,.bc,.o}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment