Skip to content

Commit

Permalink
libunwind: fix unwinding through libunwind stack frames
Browse files Browse the repository at this point in the history
Fixes #9591
  • Loading branch information
Kha authored and andrewrk committed Sep 3, 2021
1 parent 3617615 commit c72f584
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libunwind.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c72f584

Please # to comment.