zig_libc: do not call abort() on amdgpu

This commit is contained in:
Robin Voetter 2022-09-18 15:29:19 +02:00
parent 9006cd9d09
commit 86f40d3ff6
No known key found for this signature in database
GPG Key ID: E755662F227CB468

View File

@ -64,10 +64,10 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?
if (builtin.is_test) { if (builtin.is_test) {
std.debug.panic("{s}", .{msg}); std.debug.panic("{s}", .{msg});
} }
if (native_os != .freestanding and native_os != .other) { switch (native_os) {
std.os.abort(); .freestanding, .other, .amdhsa, .amdpal => while (true) {},
else => std.os.abort(),
} }
while (true) {}
} }
extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int; extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int;