commit 86f40d3ff6529baaeba1f0e7e5d7d2f0bfce00a1 (tree)
parent 9006cd9d09da083e89b58e19c0091924e1e4849f
Author: Robin Voetter <robin@voetter.nl>
Date: Sun, 18 Sep 2022 15:29:19 +0200
zig_libc: do not call abort() on amdgpu
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git 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;