diff options
Diffstat (limited to 'library/std/src/sys/personality/gcc.rs')
| -rw-r--r-- | library/std/src/sys/personality/gcc.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/library/std/src/sys/personality/gcc.rs b/library/std/src/sys/personality/gcc.rs index 75e793f18b8..019d5629d6d 100644 --- a/library/std/src/sys/personality/gcc.rs +++ b/library/std/src/sys/personality/gcc.rs @@ -93,12 +93,12 @@ const UNWIND_DATA_REG: (i32, i32) = (4, 5); // a0, a1 // https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/libsupc++/eh_personality.cc // https://github.com/gcc-mirror/gcc/blob/trunk/libgcc/unwind-c.c -cfg_if::cfg_if! { - if #[cfg(all( +cfg_select! { + all( target_arch = "arm", not(target_vendor = "apple"), not(target_os = "netbsd"), - ))] { + ) => { /// personality fn called by [ARM EHABI][armeabi-eh] /// /// 32-bit ARM on iOS/tvOS/watchOS does not use ARM EHABI, it uses @@ -202,7 +202,8 @@ cfg_if::cfg_if! { } } } - } else { + } + _ => { /// Default personality routine, which is used directly on most targets /// and indirectly on Windows x86_64 and AArch64 via SEH. unsafe extern "C" fn rust_eh_personality_impl( @@ -247,11 +248,11 @@ cfg_if::cfg_if! { } } - cfg_if::cfg_if! { - if #[cfg(any( - all(windows, any(target_arch = "aarch64", target_arch = "x86_64"), target_env = "gnu"), - target_os = "cygwin", - ))] { + cfg_select! { + any( + all(windows, any(target_arch = "aarch64", target_arch = "x86_64"), target_env = "gnu"), + target_os = "cygwin", + ) => { /// personality fn called by [Windows Structured Exception Handling][windows-eh] /// /// On x86_64 and AArch64 MinGW targets, the unwinding mechanism is SEH, @@ -279,7 +280,8 @@ cfg_if::cfg_if! { ) } } - } else { + } + _ => { /// personality fn called by [Itanium C++ ABI Exception Handling][itanium-eh] /// /// The personality routine for most non-Windows targets. This will be called by |
