| author | |
| committer | |
| log | 604fb3001d6480d1687ddeb988c64c8028d5e55a |
| tree | fb521a1b95ff0ac10a6657f39845cd18cdf906c4 |
| parent | e9c0d43c5b6fc5065ac2e22e162b7d7476f5097d |
| signature |
This only matters if `callMain` is called by a user, since `std.start`
will never itself call `callMain` when `target.os.tag == .other`.
However, it *is* a valid use case for a user to call
`std.start.callMain` in their own startup logic, so this makes sense.1 files changed, 4 insertions(+), 3 deletions(-)
lib/std/start.zig+4-3| ... | ... | @@ -635,10 +635,11 @@ pub inline fn callMain() u8 { |
| 635 | 635 | else => {}, |
| 636 | 636 | } |
| 637 | 637 | std.log.err("{s}", .{@errorName(err)}); |
| 638 | if (native_os != .freestanding) { | |
| 639 | if (@errorReturnTrace()) |trace| { | |
| 638 | switch (native_os) { | |
| 639 | .freestanding, .other => {}, | |
| 640 | else => if (@errorReturnTrace()) |trace| { | |
| 640 | 641 | std.debug.dumpStackTrace(trace); |
| 641 | } | |
| 642 | }, | |
| 642 | 643 | } |
| 643 | 644 | return 1; |
| 644 | 645 | }; |