Skip to content

Commit

Permalink
Merge pull request #20512 from aikawayataro/add-v-linker-arg
Browse files Browse the repository at this point in the history
zig ld: handle -v linker arg
  • Loading branch information
andrewrk authored Aug 7, 2024
2 parents 0e99f51 + 73021c1 commit 87e8fc1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 87e8fc1

Please sign in to comment.