Commit 6a349648cb

mlugg <mlugg@mlugg.co.uk>
2023-09-14 23:49:30
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 parent 1a0e6bc
Changed files (1)
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,
         });