commit 667035fc7834079f26ee2c97a01a412d5ff64cc2 (tree)
parent 2cb69e53b45286019465e78ec1454cf18e67bf24
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Sun, 13 Apr 2025 23:35:13 +0200
std.Build.Step: Don't capture a stack trace if !std.debug.sys_can_stack_trace.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig
@@ -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();