diff options
| author | 2026-10-14 10:05:40 +0000 | |
|---|---|---|
| committer | 2026-10-14 10:05:40 +0000 | |
| commit | ce920b6ff47f32bc06dd27124e1b882f82f3d6ae (patch) | |
| tree | 89f3dac0aa670294053320599a742d670c0ec5a4 /Makefile | |
| parent | todo: tick the parity runner; zc0 follow-ups it found (diff) | |
split compiler.zc into files by phase
src/compiler/compiler.zc is now twelve files under src/compiler/, listed in
order in src/compiler/parts. cat of the parts in order is byte-identical to
the old file, so every compiler and image except the language server's is
unchanged. no function was edited.
consumers read the list: the makefile, bootstrap-check, genmap (which still
writes one compiler.zc into a generated map directory), tinyvm.bat,
test.sh, test_win.ps1 and the lsp drivers. the language server embeds each
part and serves them joined as the one document tinyvm:/compiler.zc.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -50,8 +50,10 @@ MAP := $(B)/core/map COREINC := -Isrc/core -I$(MAP) --embed-dir=$(B)/core CORE_H := src/core/genome.h src/core/fops.h src/core/bops.h src/core/stack.h $(MAP)/memmap.h # the sources the compiler genome is built from, and the files it embeds -ZC_SRC := src/runtime/rt.zc src/core/core.zc src/compiler/compiler.zc -ZC_DEPS := $(ZC_SRC) src/lib/std.zc src/lib/icon.zc src/tools/build.zc +# the compiler is the files named in src/compiler/parts, in that order +ZC_PARTS := $(addprefix src/compiler/,$(shell cat src/compiler/parts)) +ZC_SRC := src/runtime/rt.zc src/core/core.zc $(ZC_PARTS) +ZC_DEPS := $(ZC_SRC) src/compiler/parts src/lib/std.zc src/lib/icon.zc src/tools/build.zc TOOLS := $(BIN)/zc0$(EXE) $(BIN)/mkgenome$(EXE) $(BIN)/genmap$(EXE) PROGS := $(BIN)/zy$(EXE) $(BIN)/zym$(EXE) $(BIN)/zclsp$(EXE) @@ -64,7 +66,7 @@ $(BIN): # genmap needs no map of its own; everything else is built against the one it writes $(BIN)/genmap$(EXE): src/tools/genmap.c | $(BIN) $(CC) $(CFLAGS) src/tools/genmap.c -o $@ -$(MAP)/memmap.h: $(BIN)/genmap$(EXE) src/runtime/rt.zc src/compiler/compiler.zc +$(MAP)/memmap.h: $(BIN)/genmap$(EXE) src/runtime/rt.zc src/compiler/parts $(ZC_PARTS) mkdir -p $(B)/core $(BIN)/genmap$(EXE) --preset default --check -o $(MAP) >$(B)/core/genmap.log 2>&1 || { cat $(B)/core/genmap.log; exit 1; } $(BIN)/zc0$(EXE): src/tools/zc0.c src/core/fops.h src/core/bops.h $(MAP)/memmap.h | $(BIN) |
