Merge pull request #20512 from aikawayataro/add-v-linker-arg

zig ld: handle -v linker arg
This commit is contained in:
Andrew Kelley 2024-08-07 13:01:12 -07:00 committed by GitHub
commit 87e8fc1ade
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2529,6 +2529,10 @@ fn buildOutputType(
fatal("unable to parse /version '{s}': {s}", .{ arg, @errorName(err) });
};
have_version = true;
} else if (mem.eql(u8, arg, "-V")) {
warn("ignoring request for supported emulations: unimplemented", .{});
} 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);