Skip to content

Commit

Permalink
std: fix wasm+threads build
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Jun 23, 2024
1 parent 32f9b8b commit a2f078d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion library/std/src/sys/thread_local/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,18 @@ mod guard {
pub(super) use windows::enable;
} else if #[cfg(any(
all(target_family = "wasm", target_feature = "atomics"),
target_os = "hermit",
))] {
pub(super) fn enable() {
// FIXME: Right now there is no concept of "thread exit", but
// this is likely going to show up at some point in the form of
// an exported symbol that the wasm runtime is going to be
// expected to call. For now we just leak everything, but if
// such a function starts to exist it will probably need to
// iterate the destructor list with this function:
#[allow(unused)]
use super::destructors::run;
}
} else if #[cfg(target_os = "hermit")] {
pub(super) fn enable() {}
} else if #[cfg(target_os = "solid_asp3")] {
mod solid;
Expand Down

0 comments on commit a2f078d

Please sign in to comment.