mirror of
https://github.com/ziglang/zig.git
synced 2026-01-12 18:35:12 +00:00
zig ld: handle -v linker arg
The "-v" argument is the same as "--version", but the linker should not exit after the version is printed.
This commit is contained in:
parent
bf588f67d8
commit
3a22ad7035
@ -2475,6 +2475,8 @@ fn buildOutputType(
|
||||
fatal("unable to parse /version '{s}': {s}", .{ arg, @errorName(err) });
|
||||
};
|
||||
have_version = true;
|
||||
} else if (mem.eql(u8, arg, "-v")) {
|
||||
try std.io.getStdOut().writeAll("zig ld " ++ build_options.version ++ "\n");
|
||||
} else if (mem.eql(u8, arg, "--version")) {
|
||||
try std.io.getStdOut().writeAll("zig ld " ++ build_options.version ++ "\n");
|
||||
process.exit(0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user