diff options
| author | Sebastian Urban <surban@surban.net> | 2024-12-05 12:18:14 +0100 |
|---|---|---|
| committer | Sebastian Urban <surban@surban.net> | 2024-12-05 12:18:14 +0100 |
| commit | e4092bd9091a68fcc6ddce0a0a72290003c4d560 (patch) | |
| tree | 0566fe91dec27368a8d7878d65d7e0ce9d29d1ab | |
| parent | 4fe15b06e8f3ea9ebcb916df2fd4b2f0e9537296 (diff) | |
| download | rust-e4092bd9091a68fcc6ddce0a0a72290003c4d560.tar.gz rust-e4092bd9091a68fcc6ddce0a0a72290003c4d560.zip | |
Fix compilation for wasm32-wasip1 (without threads).
| -rw-r--r-- | library/std/src/sys/thread_local/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/sys/thread_local/mod.rs b/library/std/src/sys/thread_local/mod.rs index 82e1aeabf5b..f0a13323ec9 100644 --- a/library/std/src/sys/thread_local/mod.rs +++ b/library/std/src/sys/thread_local/mod.rs @@ -86,7 +86,9 @@ pub(crate) mod guard { mod windows; pub(crate) use windows::enable; } else if #[cfg(any( - all(target_family = "wasm", not(target_os="wasi")), + all(target_family = "wasm", not( + all(target_os = "wasi", target_env = "p1", target_feature = "atomics") + )), target_os = "uefi", target_os = "zkvm", ))] { @@ -135,7 +137,7 @@ pub(crate) mod key { target_family = "unix", ), target_os = "teeos", - target_os = "wasi", + all(target_os = "wasi", target_env = "p1", target_feature = "atomics"), ))] { mod racy; mod unix; |
