[clang] [Clang][Driver] Declare win32 threads on Windows (PR #121442)

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 1 14:33:47 PST 2025


================
@@ -619,7 +619,13 @@ class ToolChain {
   virtual bool SupportsEmbeddedBitcode() const { return false; }
 
   /// getThreadModel() - Which thread model does this target use?
-  virtual std::string getThreadModel() const { return "posix"; }
+  virtual std::string getThreadModel() const {
+#ifdef _WIN32
+    return "win32";
----------------
mstorsjo wrote:

I think this rather should check the target OS, than to decide based on the host OS that the binary is running on; in particular, the test you're modifying uses an explicit ARM linux target.

https://github.com/llvm/llvm-project/pull/121442


More information about the cfe-commits mailing list