| ... | @@ -87,6 +87,12 @@ pub fn main() !void { | ... | @@ -87,6 +87,12 @@ pub fn main() !void { |
| 87 | warn("Expected argument after {s}\n\n", .{arg}); | 87 | warn("Expected argument after {s}\n\n", .{arg}); |
| 88 | return usageAndErr(builder, false, stderr_stream); | 88 | return usageAndErr(builder, false, stderr_stream); |
| 89 | }; | 89 | }; |
| | 90 | } else if (mem.eql(u8, arg, "--sysroot")) { |
| | 91 | const sysroot = nextArg(args, &arg_idx) orelse { |
| | 92 | warn("Expected argument after --sysroot\n\n", .{}); |
| | 93 | return usageAndErr(builder, false, stderr_stream); |
| | 94 | }; |
| | 95 | builder.sysroot = sysroot; |
| 90 | } else if (mem.eql(u8, arg, "--search-prefix")) { | 96 | } else if (mem.eql(u8, arg, "--search-prefix")) { |
| 91 | const search_prefix = nextArg(args, &arg_idx) orelse { | 97 | const search_prefix = nextArg(args, &arg_idx) orelse { |
| 92 | warn("Expected argument after --search-prefix\n\n", .{}); | 98 | warn("Expected argument after --search-prefix\n\n", .{}); |
| ... | @@ -195,6 +201,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void | ... | @@ -195,6 +201,7 @@ fn usage(builder: *Builder, already_ran_build: bool, out_stream: anytype) !void |
| 195 | \\ -h, --help Print this help and exit | 201 | \\ -h, --help Print this help and exit |
| 196 | \\ --verbose Print commands before executing them | 202 | \\ --verbose Print commands before executing them |
| 197 | \\ -p, --prefix [path] Override default install prefix | 203 | \\ -p, --prefix [path] Override default install prefix |
| | 204 | \\ --sysroot [path] Set the system root directory (usually /) |
| 198 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers | 205 | \\ --search-prefix [path] Add a path to look for binaries, libraries, headers |
| 199 | \\ --libc [file] Provide a file which specifies libc paths | 206 | \\ --libc [file] Provide a file which specifies libc paths |
| 200 | \\ --color [auto|off|on] Enable or disable colored error messages | 207 | \\ --color [auto|off|on] Enable or disable colored error messages |