aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2025-08-04 09:37:18 +0100
committermlugg <mlugg@mlugg.co.uk>2025-08-04 09:47:56 +0100
commit422e8d476c4f407abe2915932fc01012682051fe (patch)
treeec9e9fa787dea85579bd7f3359181416bd0bf474 /lib/compiler
parent32a069f909a34b22a2049dca39ef5a1965cba21b (diff)
downloadzig-422e8d476c4f407abe2915932fc01012682051fe.tar.gz
zig-422e8d476c4f407abe2915932fc01012682051fe.zip
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
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/build_runner.zig3
1 files changed, 3 insertions, 0 deletions
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