aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-22 21:10:01 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-22 21:10:01 +0100
commitc9eef7c835b46ace09e0e149ef52af44f7ff7f36 (patch)
tree170ecc5cf5607881ca685304d531827bab67a334 /src/llvm_backend.cpp
parentf36ade8c640b78c7c2343d3d2bed54a224ef3deb (diff)
Single thread `lb_create_startup_runtime_generate_body`
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index 1742271b6..d0e9d293d 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -12,7 +12,7 @@
#endif
#ifndef LLVM_WEAK_MONOMORPHIZATION
-#define LLVM_WEAK_MONOMORPHIZATION 1
+#define LLVM_WEAK_MONOMORPHIZATION (USE_SEPARATE_MODULES && 1)
#endif
@@ -2070,11 +2070,10 @@ gb_internal lbProcedure *lb_create_startup_runtime(lbModule *main_module, lbProc
LLVMSetVisibility(p->value, LLVMHiddenVisibility);
LLVMSetLinkage(p->value, LLVMWeakAnyLinkage);
- p->generate_body = lb_create_startup_runtime_generate_body;
p->global_variables = &global_variables;
p->objc_names = objc_names;
- mpsc_enqueue(&main_module->procedures_to_generate, p);
+ lb_create_startup_runtime_generate_body(main_module, p);
return p;
}