aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_proc.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2026-01-15 18:12:39 +0000
committergingerBill <gingerBill@users.noreply.github.com>2026-01-15 18:12:39 +0000
commit557e854864e13f5da23533547b443ffde471cfc9 (patch)
treeb7ba1f5dd2128ce84162d407ee4da5df3dacb777 /src/llvm_backend_proc.cpp
parentf4a7e0b279043357a550c26f1972835f9f5688a1 (diff)
`-disable-unwind`
Diffstat (limited to 'src/llvm_backend_proc.cpp')
-rw-r--r--src/llvm_backend_proc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp
index 524c37186..640a43111 100644
--- a/src/llvm_backend_proc.cpp
+++ b/src/llvm_backend_proc.cpp
@@ -153,6 +153,10 @@ gb_internal lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool i
lb_ensure_abi_function_type(m, p);
lb_add_function_type_attributes(p->value, p->abi_function_type, p->abi_function_type->calling_convention);
+ if (build_context.disable_unwind) {
+ lb_add_attribute_to_proc(m, p->value, "nounwind");
+ }
+
if (pt->Proc.diverging) {
lb_add_attribute_to_proc(m, p->value, "noreturn");
}