From 9d4a6d67aa3b85c64e0b2367d8ab30ae72f64834 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Mon, 30 Aug 2021 17:38:25 +0200 Subject: [PATCH] libunwind: fix unwinding through libunwind stack frames Fixes #9591 --- src/libunwind.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libunwind.zig b/src/libunwind.zig index 0d70854213..192f9ac2d2 100644 --- a/src/libunwind.zig +++ b/src/libunwind.zig @@ -71,6 +71,8 @@ pub fn buildStaticLib(comp: *Compilation) !void { try cflags.append("-Wa,--noexecstack"); try cflags.append("-fvisibility=hidden"); try cflags.append("-fvisibility-inlines-hidden"); + // necessary so that libunwind can unwind through its own stack frames + try cflags.append("-funwind-tables"); // This is intentionally always defined because the macro definition means, should it only // build for the target specified by compiler defines. Since we pass -target the compiler