[PATCH] D64776: [WebAssembly] Compile all TLS on Emscripten as local-exec
Guanzhong Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 16:50:23 PDT 2019
quantum updated this revision to Diff 209997.
quantum added a comment.
Undo compressing the previous diff.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64776/new/
https://reviews.llvm.org/D64776
Files:
llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
Index: llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
@@ -179,8 +179,14 @@
report_fatal_error("cannot use thread-local storage without bulk memory",
false);
+ // Currently Emscripten does not support dynamic linking with threads.
+ // Therefore, if we have thread-local storage, only the local-exec model
+ // is possible.
+ // TODO: remove this and implement proper TLS models once Emscripten
+ // supports dynamic linking with threads.
if (GA->getGlobal()->getThreadLocalMode() !=
- GlobalValue::LocalExecTLSModel) {
+ GlobalValue::LocalExecTLSModel &&
+ !Subtarget->getTargetTriple().isOSEmscripten()) {
report_fatal_error("only -ftls-model=local-exec is supported for now",
false);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64776.209997.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190715/48522308/attachment.bin>
More information about the cfe-commits
mailing list