Skip to content

Commit c72f584

Browse files
Khaandrewrk
authored andcommitted
libunwind: fix unwinding through libunwind stack frames
Fixes #9591
1 parent 3617615 commit c72f584

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libunwind.zig

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ pub fn buildStaticLib(comp: *Compilation) !void {
7171
try cflags.append("-Wa,--noexecstack");
7272
try cflags.append("-fvisibility=hidden");
7373
try cflags.append("-fvisibility-inlines-hidden");
74+
// necessary so that libunwind can unwind through its own stack frames
75+
try cflags.append("-funwind-tables");
7476

7577
// This is intentionally always defined because the macro definition means, should it only
7678
// build for the target specified by compiler defines. Since we pass -target the compiler

0 commit comments

Comments
 (0)