diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-25 17:53:26 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-25 17:53:26 -0500 |
| commit | 659c1bdeeebce7bf32e122be6a728fe727112c56 (patch) | |
| tree | 774feeeee06ea881be48caf769cd0e96944d5345 /lib/std/debug.zig | |
| parent | cb38bd0a1436bd18de8ed57c45ffc890c8ddfb78 (diff) | |
| parent | 0f0d01a0374dd62d55a0fe3eed72b9ec009af410 (diff) | |
| download | zig-659c1bdeeebce7bf32e122be6a728fe727112c56.tar.gz zig-659c1bdeeebce7bf32e122be6a728fe727112c56.zip | |
Merge branch 'wasi-run-tests' of https://github.com/fengb/zig into fengb-wasi-run-tests
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 9df7370ad0..226574b3dd 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -213,7 +213,8 @@ pub fn assert(ok: bool) void { pub fn panic(comptime format: []const u8, args: ...) noreturn { @setCold(true); - const first_trace_addr = @returnAddress(); + // TODO: remove conditional once wasi / LLVM defines __builtin_return_address + const first_trace_addr = if (builtin.os == .wasi) null else @returnAddress(); panicExtra(null, first_trace_addr, format, args); } |
