| author | |
| committer | |
| log | c9ac607bd3bf2cc1cfb941e54e6bcd53f2fcc59d |
| tree | 7a209cc34fc256887e92864dfe5b17d7190822ba |
| parent | 7b57454cc11371b71097967656e19f0a1736d733 |
2 files changed, 7 insertions(+), 4 deletions(-)
src/codegen.cpp+1| ... | ... | @@ -5444,6 +5444,7 @@ static void define_builtin_compile_vars(CodeGen *g) { |
| 5444 | 5444 | buf_appendf(contents, "pub const object_format = ObjectFormat.%s;\n", cur_obj_fmt); |
| 5445 | 5445 | buf_appendf(contents, "pub const mode = %s;\n", build_mode_to_str(g->build_mode)); |
| 5446 | 5446 | buf_appendf(contents, "pub const link_libc = %s;\n", bool_to_str(g->libc_link_lib != nullptr)); |
| 5447 | buf_appendf(contents, "pub const have_error_return_tracing = %s;\n", bool_to_str(g->have_err_ret_tracing)); | |
| 5447 | 5448 | |
| 5448 | 5449 | buf_appendf(contents, "pub const __zig_test_fn_slice = {}; // overwritten later\n"); |
| 5449 | 5450 |
std/special/panic.zig+6-4| ... | ... | @@ -13,10 +13,12 @@ pub coldcc fn panic(msg: []const u8, error_return_trace: ?&builtin.StackTrace) - |
| 13 | 13 | while (true) {} |
| 14 | 14 | }, |
| 15 | 15 | else => { |
| 16 | if (error_return_trace) |trace| { | |
| 17 | std.debug.warn("{}\n", msg); | |
| 18 | std.debug.dumpStackTrace(trace); | |
| 19 | @import("std").debug.panic(""); | |
| 16 | if (builtin.have_error_return_tracing) { | |
| 17 | if (error_return_trace) |trace| { | |
| 18 | std.debug.warn("{}\n", msg); | |
| 19 | std.debug.dumpStackTrace(trace); | |
| 20 | @import("std").debug.panic(""); | |
| 21 | } | |
| 20 | 22 | } |
| 21 | 23 | @import("std").debug.panic("{}", msg); |
| 22 | 24 | }, |