From 557e854864e13f5da23533547b443ffde471cfc9 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 15 Jan 2026 18:12:39 +0000 Subject: `-disable-unwind` --- src/llvm_backend_proc.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/llvm_backend_proc.cpp') 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"); } -- cgit v1.2.3