Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libunwind][cmake] Compile _Unwind* routines with -fexceptions #121819

7 changes: 6 additions & 1 deletion libunwind/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -20,7 +20,12 @@ set(LIBUNWIND_C_SOURCES
)
set_source_files_properties(${LIBUNWIND_C_SOURCES}
PROPERTIES
COMPILE_FLAGS "-std=c99")
# We need to set `-fexceptions` here so that key
# unwinding functions, like
# _UNWIND_RaiseExcpetion, are not marked as
ilovepi marked this conversation as resolved.
Show resolved Hide resolved
# `nounwind`, which breaks LTO builds of
# libunwind. See #56825 and #120657 for context.
COMPILE_FLAGS "-std=c99 -fexceptions")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also leave a comment here explaining why we need -fexceptions?


set(LIBUNWIND_ASM_SOURCES
UnwindRegistersRestore.S