From b6d93d9167ea4b8d28d27429a0c14e8dc0060d86 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 15 Nov 2019 11:52:46 +0100 Subject: [PATCH 1/2] libpanic_unwind for Miri: make sure we have the SEH lang items when needed --- src/libpanic_unwind/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index d97a7a8a87d8d..c69399a87d969 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -39,6 +39,10 @@ cfg_if::cfg_if! { if #[cfg(miri)] { #[path = "miri.rs"] mod imp; + // On MSVC we need the SEH lang items as well... + #[cfg(all(target_env = "msvc", not(target_arch = "aarch64")))] + #[allow(unused)] + mod seh; } else if #[cfg(target_os = "emscripten")] { #[path = "emcc.rs"] mod imp; From 065e1b8d8a68efeaaa4eb603e66fc937ae12b1b0 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 15 Nov 2019 15:57:01 +0100 Subject: [PATCH 2/2] more comment --- src/libpanic_unwind/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index c69399a87d969..5f345c2133f6b 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -40,6 +40,7 @@ cfg_if::cfg_if! { #[path = "miri.rs"] mod imp; // On MSVC we need the SEH lang items as well... + // This should match the conditions of the `seh.rs` import below. #[cfg(all(target_env = "msvc", not(target_arch = "aarch64")))] #[allow(unused)] mod seh;