0
0
mirror of https://github.com/llvm/llvm-project.git synced 2025-04-24 12:56:06 +00:00
Paul Kirth 92f1f99d2e
[libunwind][cmake] Compile _Unwind* routines with -fexceptions ()
When building libunwind with LTO, we found that routines, like
_Unwind_RaiseException were marked `nounwind`. This causes problems when
libunwind is then used with exception throwing code, since many of the
routines are marked `nounwind` and the compiler infers that something
like a try/catch block cannot throw resulting in a miscompile
(see ). Similarly, in , it was pointed out that marking
_Unwind_Resume as `nounwind` causes bad exception table generation.

This patch adds the `-fexceptions` flag to the build of the C files that
define these routines, as proposed in .

Fixes  

---------

Co-authored-by: Petr Hosek <phosek@google.com>
2025-01-16 13:44:55 -08:00
..