build: separate package identity from storage paths

This commit is contained in:
2026-08-13 05:37:56 +09:00
parent 5f0f544157
commit c3df0afeb0
11 changed files with 1167 additions and 505 deletions

View File

@@ -864,6 +864,8 @@ wwi_emit(Checker *c, FILE *of, Node *file)
const char *dot = strrchr(file->module, '.');
pkg = dot ? dot + 1 : file->module;
}
if (file->module != NULL && file->module[0] != '\0')
fprintf(of, "//ww:module %s\n", file->module);
fprintf(of, "package %s;\n", pkg);
/* imports — primary N_USE, byte-sorted by import path. */