Commit 6ce37845af

Andrew Kelley <andrew@ziglang.org>
2023-08-03 00:19:26
build.zig: use InstallArtifact Options instead of mutation
I expect this to have no functional change.
1 parent aef8bcf
Changed files (1)
build.zig
@@ -204,10 +204,9 @@ pub fn build(b: *std.Build) !void {
     );
 
     if (!no_bin) {
-        const install_exe = b.addInstallArtifact(exe, .{});
-        if (flat) {
-            install_exe.dest_dir = .prefix;
-        }
+        const install_exe = b.addInstallArtifact(exe, .{
+            .dest_dir = if (flat) .{ .override = .prefix } else .default,
+        });
         b.getInstallStep().dependOn(&install_exe.step);
     }