aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCamil Staps2021-01-10 20:58:15 +0100
committerCamil Staps2021-01-10 20:58:15 +0100
commit7c1ba3af4d55bd8004d3cfab3276bd60e455cab3 (patch)
tree0099e9203585695800cfdfb35d110515c6886e61 /Makefile
parentPrepare to use a specialized calling convention: return globasp (diff)
Many improvements for A-stack implementation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 27a0c15..6dd3894 100644
--- a/Makefile
+++ b/Makefile
@@ -5,26 +5,31 @@ ASM:=$(addsuffix .s,$(BIN))
BC:=$(addsuffix .bc,$(BIN))
DEPS:=rts.ll
+OPT:=opt-11
+AS:=llvm-as-11
+LLC:=~/projects/llvm-project/build/bin/llc
+CLANG:=clang-11
+
all: $(BIN)
$(BIN): %: %.o
- clang-11 $^ -o $@
+ $(CLANG) $^ -o $@
$(OBJ): %.o: %.bc
- llc-11 -filetype=obj $^ -o $@
+ $(LLC) -relocation-model=static -filetype=obj $^ -o $@
$(ASM): %.s: %.bc
- llc-11 $^ -o $@
+ $(LLC) -relocation-model=static $^ -o $@
$(BC): %.bc: %.opt.ll
- llvm-as-11 $^ -o $@
+ $(AS) $^ -o $@
$(OPTLL): %.opt.ll: $(DEPS) %.ll
cat $^ \
- | opt-11 -S -always-inline \
- | opt-11 -S -O3 \
+ | $(OPT) -S -always-inline \
+ | $(OPT) -S -O3 \
| sed 's/noinline nounwind optnone/nounwind/' \
- | opt-11 -S -O3 \
+ | $(OPT) -S -O3 \
-o $@
clean: