| ... | @@ -93,6 +93,12 @@ pub fn main() !void { | ... | @@ -93,6 +93,12 @@ pub fn main() !void { |
| 93 | return usageAndErr(builder, false, stderr_stream); | 93 | return usageAndErr(builder, false, stderr_stream); |
| 94 | }; | 94 | }; |
| 95 | builder.addSearchPrefix(search_prefix); | 95 | builder.addSearchPrefix(search_prefix); |
| | 96 | } else if (mem.eql(u8, arg, "--libc")) { |
| | 97 | const libc_file = nextArg(args, &arg_idx) orelse { |
| | 98 | warn("Expected argument after --libc\n\n", .{}); |
| | 99 | return usageAndErr(builder, false, stderr_stream); |
| | 100 | }; |
| | 101 | builder.libc_file = libc_file; |
| 96 | } else if (mem.eql(u8, arg, "--color")) { | 102 | } else if (mem.eql(u8, arg, "--color")) { |
| 97 | const next_arg = nextArg(args, &arg_idx) orelse { | 103 | const next_arg = nextArg(args, &arg_idx) orelse { |
| 98 | warn("expected [auto|on|off] after --color", .{}); | 104 | warn("expected [auto|on|off] after --color", .{}); |
| ... | @@ -190,6 +196,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void | ... | @@ -190,6 +196,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void |
| 190 | \\ --verbose Print commands before executing them | 196 | \\ --verbose Print commands before executing them |
| 191 | \\ -p, --prefix [path] Override default install prefix | 197 | \\ -p, --prefix [path] Override default install prefix |
| 192 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers | 198 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers |
| | 199 | \\ --libc [file] Provide a file which specifies libc paths |
| 193 | \\ --color [auto|off|on] Enable or disable colored error messages | 200 | \\ --color [auto|off|on] Enable or disable colored error messages |
| 194 | \\ | 201 | \\ |
| 195 | \\Project-Specific Options: | 202 | \\Project-Specific Options: |