commit 748f041829a19378947615a712e6453c38fb9ab4 parent 0df57591123baa32334bdd98c24f78a0ade4d680 Author: Yersa Nordman <finwo@pm.me> Date: Sat, 12 Oct 2019 11:45:33 +0200 Separate .ll generation Diffstat:
| M | Makefile | | | 10 | +++++----- |
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,8 +1,5 @@ -CC = clang -LD = wasm-ld TARGET ?= wasm32 -CFLAGS ?= -Os SRC=$(shell find -L src/$(TARGET) -type f -name *.c) OBJ=$(SRC:.c=.o) @@ -10,8 +7,11 @@ OBJ=$(SRC:.c=.o) libmatter.a: $(OBJ) ar -cvq libmatter.a $(OBJ) -%.o: %.c - $(CC) $(CFLAGS) --target=$(TARGET) -nostdinc -fno-builtin -Iinclude -c $< -o $@ +%.ll: %.c + clang -Os $(CFLAGS) --target=$(TARGET) -nostdinc -fno-builtin -Iinclude -c $< -o $@ + +%.o: %.ll + llc -march=$(TARGET) -filetype=obj -O3 $< .PHONY: clean clean: