From 422e8d476c4f407abe2915932fc01012682051fe Mon Sep 17 00:00:00 2001 From: mlugg Date: Mon, 4 Aug 2025 09:37:18 +0100 Subject: 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 --- lib/compiler/build_runner.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/compiler') diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig index e97b7aa313..f1a0caf47c 100644 --- a/lib/compiler/build_runner.zig +++ b/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 -- cgit v1.2.3