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);
     }


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);
     }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D64776: [WebAssembl... Guanzhong Chen via Phabricator via cfe-commits

Reply via email to