diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-29 16:51:38 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-29 16:51:38 +0100 |
| commit | 34d040cef18635b95f5bc13bef793c35ff0647ed (patch) | |
| tree | 9fea5955dee099f42e0b4b433e26dc0ed6e2f6f3 /src/llvm_backend_general.cpp | |
| parent | 9e8be055c1152bd42f533f544308355de87a361e (diff) | |
Correct format stringsbill/global-variable-distribution
Diffstat (limited to 'src/llvm_backend_general.cpp')
| -rw-r--r-- | src/llvm_backend_general.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp index 123af51f5..39cf70a6a 100644 --- a/src/llvm_backend_general.cpp +++ b/src/llvm_backend_general.cpp @@ -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 |