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
This commit is contained in:
mlugg 2025-08-04 09:37:18 +01:00
parent 32a069f909
commit 422e8d476c
No known key found for this signature in database
GPG Key ID: 3F5B7DCCBF4AF02E

View File

@ -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