[WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets
authorAndrew Brown <andrew.brown@intel.com>
Mon, 25 Jul 2022 20:16:07 +0000 (13:16 -0700)
committerSam Clegg <sbc@chromium.org>
Mon, 25 Jul 2022 20:25:46 +0000 (13:25 -0700)
commit3696a789d2aaef455a5c2268be1c3d06e804de64
treea0b0310c8cf3c4e8c1c7c1569bee93fc0e6f004a
parent35ea84ad6ae302ba4ac1f02a6fed9f0af5815ece
[WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets

Only Emscripten supports dynamic linking with threads. To use
thread-local storage for other targets, this change defaults to the
`localexec` model.

Differential Revision: https://reviews.llvm.org/D130053
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll
llvm/test/CodeGen/WebAssembly/tls-local-exec.ll