authorgravatar for pentuppup@noreply.codeberg.orgpentuppup <pentuppup@noreply.codeberg.org> 2026-06-23 10:06:23-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-27 01:25:16+02:00
loge0e91d13cd43f265295e6dd9f98d49b098bd302c
tree10553fb32c3df260228b8256eddec76f1bfb2f9c
parent32b44497e228c676de17d6c2a2ce78cf145a97c9

stop running LLVM codegen when we're not emitting a binary


1 files changed, 8 insertions(+), 1 deletions(-)

src/Compilation.zig+8-1
...@@ -2447,7 +2447,14 @@ pub fn create(gpa: Allocator, arena: Allocator, io: Io, diag: *CreateDiagnostic,...@@ -2447,7 +2447,14 @@ pub fn create(gpa: Allocator, arena: Allocator, io: Io, diag: *CreateDiagnostic,
2447 },2447 },
2448 }2448 }
24492449
2450 if (use_llvm) {2450 if (use_llvm and
2451 (comp.emit_bin != null or
2452 comp.emit_asm != null or
2453 comp.emit_llvm_ir != null or
2454 comp.emit_llvm_bc != null or
2455 comp.verbose_llvm_ir != null or
2456 comp.verbose_llvm_bc != null))
2457 {
2451 if (opt_zcu) |zcu| {2458 if (opt_zcu) |zcu| {
2452 zcu.llvm_object = try LlvmObject.create(arena, zcu);2459 zcu.llvm_object = try LlvmObject.create(arena, zcu);
2453 }2460 }