mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +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
@ -202,6 +202,7 @@ pub fn init(options: StepOptions) Step {
|
||||
.state = .precheck_unstarted,
|
||||
.max_rss = options.max_rss,
|
||||
.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");
|
||||
@memset(addresses, 0);
|
||||
const first_ret_addr = options.first_ret_addr orelse @returnAddress();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user