Commit 422e8d476c

mlugg <mlugg@mlugg.co.uk>
2025-08-04 10:37:18
build runner: fix FTBFS on targets without `--watch` implementation
This was a regression in #24588. I have verified that this patch works by confirming that with the downstream patches SerenityOS apply to the Zig source tree (sans the one working around this regression), I can build the build runner for SerenityOS. Resolves: #24682
1 parent 32a069f
Changed files (1)
lib
lib/compiler/build_runner.zig
@@ -502,6 +502,9 @@ pub fn main() !void {
             };
         }
 
+        // Comptime-known guard to prevent including the logic below when `!Watch.have_impl`.
+        if (!Watch.have_impl) unreachable;
+
         try w.update(gpa, run.step_stack.keys());
 
         // Wait until a file system notification arrives. Read all such events