stage1 重构代码 重构nob构建方式

This commit is contained in:
zzy committed 2026-10-22 19:58:15 +08:00
1 parent 3714c2d142
commit 4c0317fcb5
14 files changed
+4004 -2160

No files matched your search

+17 -2
View File
@@ -10,6 +10,21 @@ static const char *stage0_headers[] = {
"stage0/spl_vm_embed.h",
};
/* stage1 头也参与依赖:改结构体布局/枚举值时所有 splc0 对象必须重编,
否则残留旧布局的 .o 与新政 ABI 不一致(生成物随机错乱)。 */
static const char *splc0_headers[] = {
"stage0/spl_asp.h", "stage0/spl_mcode.h", "stage0/spl_syscall.h",
"stage0/spl_vm.h", "stage0/spl_rt_core.h", "stage0/spl_rt.h",
"stage0/spl_vm_embed.h",
"stage1/ir_opt.h", "stage1/vm_opt.h", "stage1/spl_ast.h",
"stage1/spl_ast2ir.h", "stage1/spl_attr.h", "stage1/spl_dbg.h",
"stage1/spl_diag.h", "stage1/spl_fold.h", "stage1/spl_intrin.h",
"stage1/spl_ir.h", "stage1/spl_ir2c.h", "stage1/spl_ir2vm.h",
"stage1/spl_lang_type.h", "stage1/spl_layout.h", "stage1/spl_lexer.h",
"stage1/spl_mpa.h", "stage1/spl_parser.h", "stage1/spl_scope.h",
"stage1/spl_sema.h", "stage1/spl_tok.h", "stage1/spl_type.h",
};
static const char *spl_cli_srcs[] = {"stage0/spl_cli.c", VM_SRCS};
static const char *vm_test_srcs[] = {"stage0/test_spl_vm.c", VM_SRCS};
static const char *splc0_srcs[] = {
@@ -243,8 +258,8 @@ static build_t targets[] = {
BUILD_EXE,
.exe = {.srcs = splc0_srcs,
.srcs_count = NOB_ARRAY_LEN(splc0_srcs),
.headers = stage0_headers,
.headers_count = NOB_ARRAY_LEN(stage0_headers)},
.headers = splc0_headers,
.headers_count = NOB_ARRAY_LEN(splc0_headers)},
},
{
"splc1",