wcc: c-side mangles private decls; main exempt as entry-point convention
This commit is contained in:
@@ -598,11 +598,13 @@ fn collectmods(c: *cgen, file: *node) void = {
|
||||
if (d.kind == N_FNDECL) {
|
||||
if (d.exported == 0) {
|
||||
if (d.module.len > 0) {
|
||||
let m: *modent = amalloc(c.a, 48u64): *modent;
|
||||
m.mname = d.str;
|
||||
m.module = d.module;
|
||||
m.mnext = c.mods;
|
||||
c.mods = m;
|
||||
if (!streq(d.str, "main")) {
|
||||
let m: *modent = amalloc(c.a, 48u64): *modent;
|
||||
m.mname = d.str;
|
||||
m.module = d.module;
|
||||
m.mnext = c.mods;
|
||||
c.mods = m;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user