| ... | @@ -202,6 +202,15 @@ pub fn main() !void { | ... | @@ -202,6 +202,15 @@ pub fn main() !void { |
| 202 | next_arg, @errorName(err), | 202 | next_arg, @errorName(err), |
| 203 | }); | 203 | }); |
| 204 | }; | 204 | }; |
| | 205 | } else if (mem.eql(u8, arg, "--build-id")) { |
| | 206 | builder.build_id = .fast; |
| | 207 | } else if (mem.startsWith(u8, arg, "--build-id=")) { |
| | 208 | const style = arg["--build-id=".len..]; |
| | 209 | builder.build_id = std.zig.BuildId.parse(style) catch |err| { |
| | 210 | fatal("unable to parse --build-id style '{s}': {s}", .{ |
| | 211 | style, @errorName(err), |
| | 212 | }); |
| | 213 | }; |
| 205 | } else if (mem.eql(u8, arg, "--debounce")) { | 214 | } else if (mem.eql(u8, arg, "--debounce")) { |
| 206 | const next_arg = nextArg(args, &arg_idx) orelse | 215 | const next_arg = nextArg(args, &arg_idx) orelse |
| 207 | fatalWithHint("expected u16 after '{s}'", .{arg}); | 216 | fatalWithHint("expected u16 after '{s}'", .{arg}); |
| ... | @@ -1364,6 +1373,10 @@ fn usage(b: *std.Build, out_stream: anytype) !void { | ... | @@ -1364,6 +1373,10 @@ fn usage(b: *std.Build, out_stream: anytype) !void { |
| 1364 | \\ --zig-lib-dir [arg] Override path to Zig lib directory | 1373 | \\ --zig-lib-dir [arg] Override path to Zig lib directory |
| 1365 | \\ --build-runner [file] Override path to build runner | 1374 | \\ --build-runner [file] Override path to build runner |
| 1366 | \\ --seed [integer] For shuffling dependency traversal order (default: random) | 1375 | \\ --seed [integer] For shuffling dependency traversal order (default: random) |
| | 1376 | \\ --build-id[=style] At a minor link-time expense, coordinates stripped binaries |
| | 1377 | \\ fast, uuid, sha1, md5 with debug symbols via a '.note.gnu.build-id' section |
| | 1378 | \\ 0x[hexstring] Maximum 32 bytes |
| | 1379 | \\ none (default) Disable build-id |
| 1367 | \\ --debug-log [scope] Enable debugging the compiler | 1380 | \\ --debug-log [scope] Enable debugging the compiler |
| 1368 | \\ --debug-pkg-config Fail if unknown pkg-config flags encountered | 1381 | \\ --debug-pkg-config Fail if unknown pkg-config flags encountered |
| 1369 | \\ --debug-rt Debug compiler runtime libraries | 1382 | \\ --debug-rt Debug compiler runtime libraries |