From 6a349648cb29b3e624dfffcc412c4249c0e19d9f Mon Sep 17 00:00:00 2001 From: mlugg Date: Thu, 14 Sep 2023 22:49:30 +0100 Subject: [PATCH] build: don't skip compiler build with -Dno-bin This option exists for fast iteration during compiler development, since avoiding codegen (but still performing semantic analysis) causes compile errors to appear around twice as fast. This option was broken when the `emit_bin` property on `std.Build.Step.Compile` was removed. Now, when this option is passed, we add a direct install dependency on the compile step itself, so that it is always run. --- build.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 5211a9a70a..18d7dcb59d 100644 --- a/build.zig +++ b/build.zig @@ -204,7 +204,9 @@ pub fn build(b: *std.Build) !void { "Request creation of '.note.gnu.build-id' section", ); - if (!no_bin) { + if (no_bin) { + b.getInstallStep().dependOn(&exe.step); + } else { const install_exe = b.addInstallArtifact(exe, .{ .dest_dir = if (flat) .{ .override = .prefix } else .default, });