mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.start: also don't print error trace targeting .other
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.
This commit is contained in:
parent
e9c0d43c5b
commit
604fb3001d
@ -635,10 +635,11 @@ pub inline fn callMain() u8 {
|
||||
else => {},
|
||||
}
|
||||
std.log.err("{s}", .{@errorName(err)});
|
||||
if (native_os != .freestanding) {
|
||||
if (@errorReturnTrace()) |trace| {
|
||||
switch (native_os) {
|
||||
.freestanding, .other => {},
|
||||
else => if (@errorReturnTrace()) |trace| {
|
||||
std.debug.dumpStackTrace(trace);
|
||||
}
|
||||
},
|
||||
}
|
||||
return 1;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user