Skip to content

Commit 667035f

Browse files
committed
std.Build.Step: Don't capture a stack trace if !std.debug.sys_can_stack_trace.
1 parent 2cb69e5 commit 667035f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/std/Build/Step.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ pub fn init(options: StepOptions) Step {
202202
.state = .precheck_unstarted,
203203
.max_rss = options.max_rss,
204204
.debug_stack_trace = blk: {
205+
if (!std.debug.sys_can_stack_trace) break :blk &.{};
205206
const addresses = arena.alloc(usize, options.owner.debug_stack_frames_count) catch @panic("OOM");
206207
@memset(addresses, 0);
207208
const first_ret_addr = options.first_ret_addr orelse @returnAddress();

0 commit comments

Comments
 (0)