| author | |
| committer | |
| log | da84ef2a9cd55bd3fdf8d2005a69ed9be86db689 |
| tree | b7d5b307c3afb7eaf85b94f85289c926e08a6688 |
| parent | a39d3155b45cf2a1d5c91c7c82089c6f4ed7213c |
| signature | Commit is signed but in an unrecognized format. |
Closes #7101
Co-authored-by: pfg <pfg@pfg.pw>2 files changed, 4 insertions(+), 3 deletions(-)
lib/std/special/build_runner.zig+2-2| ... | ... | @@ -69,7 +69,7 @@ pub fn main() !void { |
| 69 | 69 | } else if (mem.startsWith(u8, arg, "-")) { |
| 70 | 70 | if (mem.eql(u8, arg, "--verbose")) { |
| 71 | 71 | builder.verbose = true; |
| 72 | } else if (mem.eql(u8, arg, "--help")) { | |
| 72 | } else if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) { | |
| 73 | 73 | return usage(builder, false, stdout_stream); |
| 74 | 74 | } else if (mem.eql(u8, arg, "--prefix")) { |
| 75 | 75 | builder.install_prefix = nextArg(args, &arg_idx) orelse { |
| ... | ... | @@ -176,7 +176,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void |
| 176 | 176 | try out_stream.writeAll( |
| 177 | 177 | \\ |
| 178 | 178 | \\General Options: |
| 179 | \\ --help Print this help and exit | |
| 179 | \\ -h, --help Print this help and exit | |
| 180 | 180 | \\ --verbose Print commands before executing them |
| 181 | 181 | \\ --prefix [path] Override default install prefix |
| 182 | 182 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers |
src/main.zig+2-1| ... | ... | @@ -46,6 +46,7 @@ const usage = |
| 46 | 46 | \\ c++ Use Zig as a drop-in C++ compiler |
| 47 | 47 | \\ env Print lib path, std path, cache directory, and version |
| 48 | 48 | \\ fmt Reformat Zig source into canonical form |
| 49 | \\ help Print this help and exit | |
| 49 | 50 | \\ init-exe Initialize a `zig build` application in the cwd |
| 50 | 51 | \\ init-lib Initialize a `zig build` library in the cwd |
| 51 | 52 | \\ libc Display native libc paths file or validate one |
| ... | ... | @@ -195,7 +196,7 @@ pub fn mainArgs(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v |
| 195 | 196 | try @import("print_env.zig").cmdEnv(arena, cmd_args, io.getStdOut().outStream()); |
| 196 | 197 | } else if (mem.eql(u8, cmd, "zen")) { |
| 197 | 198 | try io.getStdOut().writeAll(info_zen); |
| 198 | } else if (mem.eql(u8, cmd, "help")) { | |
| 199 | } else if (mem.eql(u8, cmd, "help") or mem.eql(u8, cmd, "-h") or mem.eql(u8, cmd, "--help")) { | |
| 199 | 200 | try io.getStdOut().writeAll(usage); |
| 200 | 201 | } else { |
| 201 | 202 | std.log.info("{}", .{usage}); |