From 86f40d3ff6529baaeba1f0e7e5d7d2f0bfce00a1 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Sun, 18 Sep 2022 15:29:19 +0200 Subject: [PATCH] zig_libc: do not call abort() on amdgpu --- lib/c.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/c.zig b/lib/c.zig index 4a6ca18782..4f40a351fc 100644 --- a/lib/c.zig +++ b/lib/c.zig @@ -64,10 +64,10 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ? if (builtin.is_test) { std.debug.panic("{s}", .{msg}); } - if (native_os != .freestanding and native_os != .other) { - std.os.abort(); + switch (native_os) { + .freestanding, .other, .amdhsa, .amdpal => while (true) {}, + else => std.os.abort(), } - while (true) {} } extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int;