| ... | @@ -213,7 +213,8 @@ pub fn assert(ok: bool) void { | ... | @@ -213,7 +213,8 @@ pub fn assert(ok: bool) void { |
| 213 | | 213 | |
| 214 | pub fn panic(comptime format: []const u8, args: ...) noreturn { | 214 | pub fn panic(comptime format: []const u8, args: ...) noreturn { |
| 215 | @setCold(true); | 215 | @setCold(true); |
| 216 | const first_trace_addr = @returnAddress(); | 216 | // TODO: remove conditional once wasi / LLVM defines __builtin_return_address |
| | 217 | const first_trace_addr = if (builtin.os == .wasi) null else @returnAddress(); |
| 217 | panicExtra(null, first_trace_addr, format, args); | 218 | panicExtra(null, first_trace_addr, format, args); |
| 218 | } | 219 | } |
| 219 | | 220 | |