Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[cfg(target_thread_local)] is true for WebAssembly targets without atomics enabled #84224

Open
alexcrichton opened this issue Apr 15, 2021 · 0 comments
Labels
O-wasm Target: WASM (WebAssembly), http://webassembly.org/

Comments

@alexcrichton
Copy link
Member

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 the atomics 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 on target_thread_local and not special-casing wasm so much.

This came out of a discussion in #83416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-wasm Target: WASM (WebAssembly), http://webassembly.org/
Projects
None yet
Development

No branches or pull requests

1 participant