mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-07 22:34:28 +00:00
std.Build.Step: Don't capture a stack trace if !std.debug.sys_can_stack_trace.
This commit is contained in:
parent
2cb69e53b4
commit
667035fc78
1 changed files with 1 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ pub fn init(options: StepOptions) Step {
|
||||||
.state = .precheck_unstarted,
|
.state = .precheck_unstarted,
|
||||||
.max_rss = options.max_rss,
|
.max_rss = options.max_rss,
|
||||||
.debug_stack_trace = blk: {
|
.debug_stack_trace = blk: {
|
||||||
|
if (!std.debug.sys_can_stack_trace) break :blk &.{};
|
||||||
const addresses = arena.alloc(usize, options.owner.debug_stack_frames_count) catch @panic("OOM");
|
const addresses = arena.alloc(usize, options.owner.debug_stack_frames_count) catch @panic("OOM");
|
||||||
@memset(addresses, 0);
|
@memset(addresses, 0);
|
||||||
const first_ret_addr = options.first_ret_addr orelse @returnAddress();
|
const first_ret_addr = options.first_ret_addr orelse @returnAddress();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue