Skip to content

Commit e4af1c1

Browse files
surbangitbot
authored and
gitbot
committed
Fix compilation for wasm32-wasip1 (without threads).
1 parent 2e7b0d5 commit e4af1c1

File tree

1 file changed

+4
-2
lines changed
  • std/src/sys/thread_local

1 file changed

+4
-2
lines changed

std/src/sys/thread_local/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ pub(crate) mod guard {
8686
mod windows;
8787
pub(crate) use windows::enable;
8888
} else if #[cfg(any(
89-
all(target_family = "wasm", not(target_os="wasi")),
89+
all(target_family = "wasm", not(
90+
all(target_os = "wasi", target_env = "p1", target_feature = "atomics")
91+
)),
9092
target_os = "uefi",
9193
target_os = "zkvm",
9294
))] {
@@ -135,7 +137,7 @@ pub(crate) mod key {
135137
target_family = "unix",
136138
),
137139
target_os = "teeos",
138-
target_os = "wasi",
140+
all(target_os = "wasi", target_env = "p1", target_feature = "atomics"),
139141
))] {
140142
mod racy;
141143
mod unix;

0 commit comments

Comments
 (0)