about summary refs log tree commit diff
path: root/library/panic_abort
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2021-10-28 10:58:16 -0700
committerAlex Crichton <alex@alexcrichton.com>2021-11-10 08:35:42 -0800
commit7f3ffbc8c22d0084987966b0496a63ce4d6278d5 (patch)
treea1c4eda31c419cbfdc47be846ef4dc4d5743d12c /library/panic_abort
parent68ca579406f2fa9ec62710e4a4d5d3e07a168d3c (diff)
downloadrust-7f3ffbc8c22d0084987966b0496a63ce4d6278d5.tar.gz
rust-7f3ffbc8c22d0084987966b0496a63ce4d6278d5.zip
std: Get the standard library compiling for wasm64
This commit goes through and updates various `#[cfg]` as appropriate to
get the wasm64-unknown-unknown target behaving similarly to the
wasm32-unknown-unknown target. Most of this is just updating various
conditions for `target_arch = "wasm32"` to also account for `target_arch
= "wasm64"` where appropriate. This commit also lists `wasm64` as an
allow-listed architecture to not have the `restricted_std` feature
enabled, enabling experimentation with `-Z build-std` externally.

The main goal of this commit is to enable playing around with
`wasm64-unknown-unknown` externally via `-Z build-std` in a way that's
similar to the `wasm32-unknown-unknown` target. These targets are
effectively the same and only differ in their pointer size, but wasm64
is much newer and has much less ecosystem/library support so it'll still
take time to get wasm64 fully-fledged.
Diffstat (limited to 'library/panic_abort')
-rw-r--r--library/panic_abort/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/panic_abort/src/lib.rs b/library/panic_abort/src/lib.rs
index ac75ce7f221..d31df0da364 100644
--- a/library/panic_abort/src/lib.rs
+++ b/library/panic_abort/src/lib.rs
@@ -117,7 +117,8 @@ pub unsafe extern "C-unwind" fn __rust_start_panic(_payload: *mut &mut dyn BoxMe
 pub mod personalities {
     #[rustc_std_internal_symbol]
     #[cfg(not(any(
-        all(target_arch = "wasm32", not(target_os = "emscripten"),),
+        all(target_arch = "wasm32", not(target_os = "emscripten")),
+        all(target_arch = "wasm64", not(target_os = "emscripten")),
         all(target_os = "windows", target_env = "gnu", target_arch = "x86_64",),
     )))]
     pub extern "C" fn rust_eh_personality() {}