Skip to content

Commit af7c540

Browse files
committed
Add empty __CxxFrameHandler3 impl in panic_abort
1 parent 505ed7f commit af7c540

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

library/panic_abort/src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,19 @@ pub mod personalities {
116116
)))]
117117
pub extern "C" fn rust_eh_personality() {}
118118

119+
// On *-pc-windows-msvc we need such a symbol to make linker happy.
120+
#[allow(non_snake_case)]
121+
#[no_mangle]
122+
#[cfg(all(target_os = "windows", target_env = "msvc"))]
123+
pub extern "C" fn __CxxFrameHandler3(
124+
_record: usize,
125+
_frame: usize,
126+
_context: usize,
127+
_dispatcher: usize,
128+
) -> u32 {
129+
1
130+
}
131+
119132
// On x86_64-pc-windows-gnu we use our own personality function that needs
120133
// to return `ExceptionContinueSearch` as we're passing on all our frames.
121134
#[rustc_std_internal_symbol]

0 commit comments

Comments
 (0)