[PATCH] D57874: [WebAssembly] Make thread-related options consistent

Thomas Lively via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 8 16:11:19 PST 2019


tlively added inline comments.


================
Comment at: lib/Driver/ToolChains/WebAssembly.cpp:50
+  bool HasNoPthread =
+      !Pthread && DriverArgs.hasArg(clang::driver::options::OPT_no_pthread);
+
----------------
Should this logic use `getLastArg` or perhaps `getLastArgNoClaim` to check only that the final requested configuration is consistent rather than checking all intermediate configurations?


================
Comment at: lib/Driver/ToolChains/WebAssembly.cpp:62
+    Driver.Diag(diag::err_drv_argument_not_allowed_with) << "-matomics"
+                                                         << "-no-pthread";
+  // '-mno-atomics' cannot be used with '-mthread-model posix'
----------------
I'm not sure about this one, either. What if I want atomics for multithreading but I don't want to link with libpthread?


================
Comment at: lib/Driver/ToolChains/WebAssembly.cpp:79
+    Driver.Diag(diag::err_drv_argument_not_allowed_with)
+        << "-no-pthread" << ThreadModelOpt;
+}
----------------
Same question here.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57874/new/

https://reviews.llvm.org/D57874





More information about the cfe-commits mailing list