Correct format strings

This commit is contained in:
gingerBill
2025-09-29 16:51:38 +01:00
parent 9e8be055c1
commit 34d040cef1
2 changed files with 46 additions and 9 deletions

View File

@@ -186,9 +186,32 @@ gb_internal bool lb_init_generator(lbGenerator *gen, Checker *c) {
lb_init_module(pm, do_threading);
}
if (pkg->kind == Package_Runtime) {
// allow this to be per file
} else if (!module_per_file) {
bool allow_for_per_file = pkg->kind == Package_Runtime || module_per_file;
#if 0
if (!allow_for_per_file) {
if (pkg->files.count >= 20) {
isize proc_count = 0;
for (Entity *e : gen->info->entities) {
if (e->kind != Entity_Procedure) {
continue;
}
if (e->Procedure.is_foreign) {
continue;
}
if (e->pkg == pkg) {
proc_count += 1;
}
}
if (proc_count >= 300) {
allow_for_per_file = true;
}
}
}
#endif
if (!allow_for_per_file) {
continue;
}
// NOTE(bill): Probably per file is not a good idea, so leave this for later