compiler: separate package exports from entry roots

This commit is contained in:
2026-08-12 21:59:51 +09:00
parent a88078faf8
commit fc4bde703e
15 changed files with 420 additions and 190 deletions

View File

@@ -52,13 +52,12 @@ struct Cg {
* Off on the combined path (every existing
* invocation) so M3 is a pure addition. */
int sep_isdep; /* #99: this unit is a sep DEPENDENCY, not the
* root/link-entry unit. Set from `wwiout != NULL`
* in main: the producer passes -I (.wwi output)
* to DEP units only — the root's .wwi is stripped
* (#69), so wwiout==NULL <=> root/link-entry unit.
* Gates the bare-`main` carve-out: a dep's `fn
* main` must mangle on its path like any decl;
* only the root entry stays bare. */
* root/link-entry unit. The compiler's explicit
* --entry flag clears this independently of -I:
* every package action may emit export data. Gates
* the bare-`main` carve-out: a dep's `fn main` must
* mangle on its path like any decl; only the root
* entry stays bare. */
};
/* cgen.c */