#[cfg(target_thread_local)] is true
for WebAssembly targets without atomics
enabled
#84224
Labels
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
This compiler-internal and unstable
#[cfg]
is currently per-target rather than per-target-configuration. This means that thread locals purportedly work on the wasm target when in fact (I think) they only work on the wasm target with theatomics
feature enabled.Ideally the compiler would conditionally define this
cfg
on wasm (depending on other target features enabled), and then this could enable cleaning up the definitions of thread locals in libstd a bit by relying more ontarget_thread_local
and not special-casing wasm so much.This came out of a discussion in #83416
The text was updated successfully, but these errors were encountered: