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 => {},
|
else => {},
|
||||||
}
|
}
|
||||||
std.log.err("{s}", .{@errorName(err)});
|
std.log.err("{s}", .{@errorName(err)});
|
||||||
if (native_os != .freestanding) {
|
switch (native_os) {
|
||||||
if (@errorReturnTrace()) |trace| {
|
.freestanding, .other => {},
|
||||||
|
else => if (@errorReturnTrace()) |trace| {
|
||||||
std.debug.dumpStackTrace(trace);
|
std.debug.dumpStackTrace(trace);
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user