From 305fd06756d0a90e330c957d85738f195b94bc10 Mon Sep 17 00:00:00 2001 From: InKryption Date: Mon, 21 Apr 2025 15:17:39 +0200 Subject: [PATCH] Build: check if dynamic lib installed for symlinks If the library isn't actually installed, `generated_bin` will be null, causing this to panic about a missing dependency for itself; checking for this state avoids this. --- lib/std/Build/Step/Compile.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index 92db0ca0a0..941f01dd75 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -1786,7 +1786,8 @@ fn make(step: *Step, options: Step.MakeOptions) !void { } if (compile.kind == .lib and compile.linkage != null and compile.linkage.? == .dynamic and - compile.version != null and std.Build.wantSharedLibSymLinks(compile.rootModuleTarget())) + compile.version != null and compile.generated_bin != null and + std.Build.wantSharedLibSymLinks(compile.rootModuleTarget())) { try doAtomicSymLinks( step,