authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-09-14 22:49:30+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-09-15 14:29:54+01:00
log6a349648cb29b3e624dfffcc412c4249c0e19d9f
tree894a7e796b324f3d275c591c35517e17c2ef7cc4
parent1a0e6bcdb140c844384d62b78a7f4247753f9ffd
signaturelock-open Commit is signed but in an unrecognized format.

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.

1 files changed, 3 insertions(+), 1 deletions(-)

build.zig+3-1
...@@ -204,7 +204,9 @@ pub fn build(b: *std.Build) !void {...@@ -204,7 +204,9 @@ pub fn build(b: *std.Build) !void {
204 "Request creation of '.note.gnu.build-id' section",204 "Request creation of '.note.gnu.build-id' section",
205 );205 );
206206
207 if (!no_bin) {207 if (no_bin) {
208 b.getInstallStep().dependOn(&exe.step);
209 } else {
208 const install_exe = b.addInstallArtifact(exe, .{210 const install_exe = b.addInstallArtifact(exe, .{
209 .dest_dir = if (flat) .{ .override = .prefix } else .default,211 .dest_dir = if (flat) .{ .override = .prefix } else .default,
210 });212 });