- Replace all C code generation with LLVM IR (flat DFA model with bb_ prefix labels to avoid SSA value name collisions) - Remove c.min.js, add llvm.min.js highlight.js language definition - Update shell.nix: gcc -> clang, remove sdl3/mesa deps - Download LLVM Language Reference to docs/llvm/LangRef.html - Rename #c-code to #ir-code in HTML, JS, and CSS - Replace _generateIncludes with _generateLLVMDecls for extern function declarations using LLVM_DECL_MAP - Add string pool (CodeGen.allocString, stringGlobal, llvmStringArg) for LLVM IR global string constants with getelementptr references
17 lines
300 B
Makefile
17 lines
300 B
Makefile
CLANG := clang
|
|
CFLAGS := -S -o /dev/null -x ir -Qunused-arguments
|
|
OUTDIR ?= out
|
|
|
|
SRC := $(wildcard $(OUTDIR)/*.ll)
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(SRC)
|
|
@for f in $(SRC); do \
|
|
printf " CC %s\n" "$$(basename $$f)"; \
|
|
$(CLANG) $(CFLAGS) "$$f" 2>&1 || exit 1; \
|
|
done
|
|
|
|
clean:
|
|
rm -f $(OUTDIR)/*.ll
|