Skip to content

Commit ae9a626

Browse files
authored
Rollup merge of #66441 - RalfJung:seh, r=oli-obk
libpanic_unwind for Miri: make sure we have the SEH lang items when needed r? @oli-obk @alexcrichton This is required to fix the Miri toolstate. Turns out rustc complains when doing codegen for MSVC and these lang items do not exist. For now `cfg(miri)` needs to still be able to codegen (we [plan to change that](rust-lang/miri#1048 (comment)) but that's a larger project requiring improvements to xargo and maybe also cargo; that should not block fixing the toolstate). Yes, this is a hack, but it is inside `cfg(miri)` so I hope this is okay. Cc @Aaron1011
2 parents ae0c8b5 + 065e1b8 commit ae9a626

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libpanic_unwind/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ cfg_if::cfg_if! {
3939
if #[cfg(miri)] {
4040
#[path = "miri.rs"]
4141
mod imp;
42+
// On MSVC we need the SEH lang items as well...
43+
// This should match the conditions of the `seh.rs` import below.
44+
#[cfg(all(target_env = "msvc", not(target_arch = "aarch64")))]
45+
#[allow(unused)]
46+
mod seh;
4247
} else if #[cfg(target_os = "emscripten")] {
4348
#[path = "emcc.rs"]
4449
mod imp;

0 commit comments

Comments
 (0)