| ... | @@ -110,6 +110,12 @@ pub fn main() !void { | ... | @@ -110,6 +110,12 @@ pub fn main() !void { |
| 110 | return usageAndErr(builder, false, stderr_stream); | 110 | return usageAndErr(builder, false, stderr_stream); |
| 111 | }; | 111 | }; |
| 112 | builder.addSearchPrefix(search_prefix); | 112 | builder.addSearchPrefix(search_prefix); |
| | 113 | } else if (mem.eql(u8, arg, "--libc")) { |
| | 114 | const libc_file = nextArg(args, &arg_idx) orelse { |
| | 115 | warn("Expected argument after --libc\n\n", .{}); |
| | 116 | return usageAndErr(builder, false, stderr_stream); |
| | 117 | }; |
| | 118 | builder.libc_file = libc_file; |
| 113 | } else if (mem.eql(u8, arg, "--color")) { | 119 | } else if (mem.eql(u8, arg, "--color")) { |
| 114 | const next_arg = nextArg(args, &arg_idx) orelse { | 120 | const next_arg = nextArg(args, &arg_idx) orelse { |
| 115 | warn("expected [auto|on|off] after --color", .{}); | 121 | warn("expected [auto|on|off] after --color", .{}); |
| ... | @@ -209,6 +215,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void | ... | @@ -209,6 +215,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void |
| 209 | \\ --prefix-include-dir [path] Override default include directory path | 215 | \\ --prefix-include-dir [path] Override default include directory path |
| 210 | \\ | 216 | \\ |
| 211 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers | 217 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers |
| | 218 | \\ --libc [file] Provide a file which specifies libc paths |
| 212 | \\ | 219 | \\ |
| 213 | \\ -h, --help Print this help and exit | 220 | \\ -h, --help Print this help and exit |
| 214 | \\ --verbose Print commands before executing them | 221 | \\ --verbose Print commands before executing them |