about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2024-03-23 22:59:41 -0700
committerGitHub <noreply@github.com>2024-03-23 22:59:41 -0700
commit46f9b3e8b9cbffd093a4d1e3fb9b8664213ef52b (patch)
tree4299bacdffd9a3db90e1b58364b608372703eb3c
parent862d870070f9bc880d96de33e7cfae87a3b8a92b (diff)
parent2758435a8ed8f339d1f8a72a2676d13a3960544c (diff)
downloadrust-46f9b3e8b9cbffd093a4d1e3fb9b8664213ef52b.tar.gz
rust-46f9b3e8b9cbffd093a4d1e3fb9b8664213ef52b.zip
Rollup merge of #122797 - alexcrichton:fix-compile-wasm64, r=Mark-Simulacrum
Fix compile of wasm64-unknown-unknown target

This target is a Tier 3 target so it's not tested on CI, and it's broken since last used so this commit fixes a small unwind-related issue that cropped up in the meantime.
-rw-r--r--library/unwind/src/lib.rs1
-rw-r--r--library/unwind/src/wasm.rs5
2 files changed, 5 insertions, 1 deletions
diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
index 25bb5938b4c..51d31a00afe 100644
--- a/library/unwind/src/lib.rs
+++ b/library/unwind/src/lib.rs
@@ -4,6 +4,7 @@
 #![feature(staged_api)]
 #![feature(c_unwind)]
 #![feature(strict_provenance)]
+#![cfg_attr(target_arch = "wasm64", feature(simd_wasm64))]
 #![cfg_attr(not(target_env = "msvc"), feature(libc))]
 #![cfg_attr(
     all(target_family = "wasm", not(target_os = "emscripten")),
diff --git a/library/unwind/src/wasm.rs b/library/unwind/src/wasm.rs
index b06671bcb83..f4ffac1ba16 100644
--- a/library/unwind/src/wasm.rs
+++ b/library/unwind/src/wasm.rs
@@ -59,7 +59,10 @@ pub unsafe fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwi
             wasm_throw(0, exception.cast())
         } else {
             let _ = exception;
-            core::arch::wasm32::unreachable()
+            #[cfg(target_arch = "wasm32")]
+            core::arch::wasm32::unreachable();
+            #[cfg(target_arch = "wasm64")]
+            core::arch::wasm64::unreachable();
         }
     }
 }