authorgravatar for 47302999+matteo-briani@users.noreply.github.comMatteo Briani <47302999+matteo-briani@users.noreply.github.com> 2023-06-24 22:24:50+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2023-06-24 16:24:50-04:00
log8ced903d617c85f3288182c95a2e29b7166fbc55
treeacfc89dc0fe9f3bd385d75d142c4afd41a8275a4
parent72dd22f262353fa7d37c89c7d163e97a162abb9b
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Add support for the "--version" linker argument (#16154)

closes #15549 Co-authored-by: Matteo Briani <matteo.briani@icvox.com>

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

src/main.zig+3
...@@ -2211,6 +2211,9 @@ fn buildOutputType(...@@ -2211,6 +2211,9 @@ fn buildOutputType(
2211 fatal("unable to parse /version '{s}': {s}", .{ arg, @errorName(err) });2211 fatal("unable to parse /version '{s}': {s}", .{ arg, @errorName(err) });
2212 };2212 };
2213 have_version = true;2213 have_version = true;
2214 } else if (mem.eql(u8, arg, "--version")) {
2215 try std.io.getStdOut().writeAll("zig ld " ++ build_options.version ++ "\n");
2216 process.exit(0);
2214 } else {2217 } else {
2215 fatal("unsupported linker arg: {s}", .{arg});2218 fatal("unsupported linker arg: {s}", .{arg});
2216 }2219 }