mirror of
https://github.com/ziglang/zig.git
synced 2026-02-02 20:53:44 +00:00
Add support for the "--version" linker argument (#16154)
closes #15549 Co-authored-by: Matteo Briani <matteo.briani@icvox.com>
This commit is contained in:
parent
72dd22f262
commit
8ced903d61
@ -2211,6 +2211,9 @@ fn buildOutputType(
|
||||
fatal("unable to parse /version '{s}': {s}", .{ arg, @errorName(err) });
|
||||
};
|
||||
have_version = true;
|
||||
} else if (mem.eql(u8, arg, "--version")) {
|
||||
try std.io.getStdOut().writeAll("zig ld " ++ build_options.version ++ "\n");
|
||||
process.exit(0);
|
||||
} else {
|
||||
fatal("unsupported linker arg: {s}", .{arg});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user