about summary refs log tree commit diff
path: root/library/std/src/sys/common/alloc.rs
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/std/src/sys/common/alloc.rs
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/std/src/sys/common/alloc.rs')
-rw-r--r--library/std/src/sys/common/alloc.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/std/src/sys/common/alloc.rs b/library/std/src/sys/common/alloc.rs
index 576667c0173..9665d1fa892 100644
--- a/library/std/src/sys/common/alloc.rs
+++ b/library/std/src/sys/common/alloc.rs
@@ -24,7 +24,8 @@ pub const MIN_ALIGN: usize = 8;
     target_arch = "mips64",
     target_arch = "s390x",
     target_arch = "sparc64",
-    target_arch = "riscv64"
+    target_arch = "riscv64",
+    target_arch = "wasm64",
 )))]
 pub const MIN_ALIGN: usize = 16;