[llvm-branch-commits] [libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 10 13:04:36 PST 2025
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121819
>From 9f952de3cb3e973f17121c057089a28bf4c6e5e0 Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulkirth at google.com>
Date: Mon, 6 Jan 2025 11:15:35 -0800
Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=
=?UTF-8?q?itial=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.6-beta.1
---
libunwind/src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index e7ea57734cca97..72dd3f5bca9960 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -20,7 +20,7 @@ set(LIBUNWIND_C_SOURCES
)
set_source_files_properties(${LIBUNWIND_C_SOURCES}
PROPERTIES
- COMPILE_FLAGS "-std=c99")
+ COMPILE_FLAGS "-std=c99 -fexceptions")
set(LIBUNWIND_ASM_SOURCES
UnwindRegistersRestore.S
>From 71603241c3e377a5b74c308367f066f3f9e760ae Mon Sep 17 00:00:00 2001
From: Paul Kirth <paulkirth at google.com>
Date: Tue, 7 Jan 2025 14:59:24 -0800
Subject: [PATCH 2/2] Update commit message and add comment
Created using spr 1.3.6-beta.1
---
libunwind/src/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 72dd3f5bca9960..602c99fe237b8e 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -20,6 +20,11 @@ set(LIBUNWIND_C_SOURCES
)
set_source_files_properties(${LIBUNWIND_C_SOURCES}
PROPERTIES
+ # We need to set `-fexceptions` here so that key
+ # unwinding functions, like
+ # _UNWIND_RaiseExcpetion, are not marked as
+ # `nounwind`, which breaks LTO builds of
+ # libunwind. See #56825 and #120657 for context.
COMPILE_FLAGS "-std=c99 -fexceptions")
set(LIBUNWIND_ASM_SOURCES
More information about the llvm-branch-commits
mailing list