diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-12-06 20:35:50 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-12-06 20:38:54 -0700 |
| commit | 50eb7983cde6e07d2613a6f3ab164ca055d9306f (patch) | |
| tree | be9361a684543867bf3fd1711e64c7974660d074 /src/main.zig | |
| parent | c8aba15c222e5bb8cf5d2d48678761197f564351 (diff) | |
| download | zig-50eb7983cde6e07d2613a6f3ab164ca055d9306f.tar.gz zig-50eb7983cde6e07d2613a6f3ab164ca055d9306f.zip | |
remove most conditional compilation based on stage1
There are still a few occurrences of "stage1" in the standard library
and self-hosted compiler source, however, these instances need a bit
more careful inspection to ensure no breakage.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index 067a824631..eb6cd3cff8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -3289,15 +3289,11 @@ fn parseCrossTargetOrReportFatalError( fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); }, error.UnknownObjectFormat => { - { + help: { var help_text = std.ArrayList(u8).init(allocator); defer help_text.deinit(); inline for (@typeInfo(std.Target.ObjectFormat).Enum.fields) |field| { - help_text.writer().print(" {s}\n", .{field.name}) catch - // TODO change this back to `break :help` - // this working around a stage1 bug. - //break :help; - @panic("out of memory"); + help_text.writer().print(" {s}\n", .{field.name}) catch break :help; } std.log.info("available object formats:\n{s}", .{help_text.items}); } |
