diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-08-02 15:19:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-08-03 09:52:15 -0700 |
| commit | 6ce37845af63245269efa9a959920802ce715e09 (patch) | |
| tree | 898230e179afe34e2f481945e2078b21f7ba6604 | |
| parent | aef8bcf7763cd098201d6b4b4c3e9e447188ae43 (diff) | |
| download | zig-6ce37845af63245269efa9a959920802ce715e09.tar.gz zig-6ce37845af63245269efa9a959920802ce715e09.zip | |
build.zig: use InstallArtifact Options instead of mutation
I expect this to have no functional change.
| -rw-r--r-- | build.zig | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); } |
