pluggable backend registry + generalized CLI

- cat/backend/backend.h: the CAT_BACKEND_Backend contract (name,
  description, native flag, emit(), compile()).
- cat/backend/registry.c: the single table of targets; cat_backend_find/
  default/count/at.  Adding a backend = one file + one line here.
- cat/backend/c.c: exposes cat_backend_c_backend(); body unchanged.
- cat/backend/x86_64.c: the native x86-64 backend descriptor (lowering
  stubbed for now).
- main.c: --backend <name> --emit/--build, --list-backends; --emit-c and
  --build stay as shortcuts for the default (c) backend.
- Makefile: build the new files.  Suite 151 -> 155.
This commit is contained in:
Minus committed 2026-11-18 19:42:04 +00:00
1 parent 841c445a05
commit 1832326a3d
6 files changed
+273 -8

No files matched your search

+2
View File
@@ -33,6 +33,8 @@ SRCS := \
src/cat/vm.c \
src/cat/module.c \
src/cat/backend/c.c \
src/cat/backend/x86_64.c \
src/cat/backend/registry.c \
src/cat/types/empty.c \
src/cat/types/type.c \
src/cat/types/bool.c \