[PATCH] D91274: [WebAssembly] Ban all TLS on non-emscripten targets (even local-exec)
Alex Crichton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 13:39:26 PST 2020
alexcrichton added a comment.
Currently we specify the TLS model as "local-exec" for non-threaded wasm code, but we never emit `thread_local` for globals. When the `atomics` feature is enabled we do use `thread_local` for globals as needed. Rust does not by default enable bulk-memory and we still rely on users when compiling with atomics to also enable bulk-memory.
We don't have a precompiled target for threads and wasm but we do have support for recompiling the standard library and running the result. There's an example at https://rustwasm.github.io/wasm-bindgen/examples/raytrace.html.
It's also probably worth pointing out that we rely on the atomics lowering pass by default for wasm targets, and only with `-Ctarget-feature=+atomics` do we disable that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91274/new/
https://reviews.llvm.org/D91274
More information about the llvm-commits
mailing list