From b281ff9a881761bb2d8f857a0f1a6e17d1f691ab Mon Sep 17 00:00:00 2001 From: David Gonzalez Martin Date: Fri, 26 Apr 2024 08:14:01 -0600 Subject: [PATCH] Fix segfault in ReleaseFast --- bootstrap/backend/llvm.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap/backend/llvm.zig b/bootstrap/backend/llvm.zig index 0ab6b36..284b368 100644 --- a/bootstrap/backend/llvm.zig +++ b/bootstrap/backend/llvm.zig @@ -3255,7 +3255,9 @@ pub fn codegen(unit: *Compilation.Unit, context: *const Compilation.Context) !vo } } - llvm.debug_info_builder.finalize(); + if (unit.descriptor.generate_debug_information) { + llvm.debug_info_builder.finalize(); + } var module_len: usize = 0; const module_ptr = llvm.module.toString(&module_len);