[clang] [MinGW] MinGW pthread (PR #74981)

εΎζŒζ’ Xu Chiheng via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 31 13:05:13 PST 2023


https://github.com/xu-chiheng updated https://github.com/llvm/llvm-project/pull/74981

>From 0a90989e77603a49b17eaf44cbbffa9c003afb54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E6=8C=81=E6=81=92=20Xu=20Chiheng?=
 <chiheng.xu at gmail.com>
Date: Sun, 10 Dec 2023 15:12:11 +0800
Subject: [PATCH] 1

---
 clang/lib/Driver/ToolChains/MinGW.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp
index 65512f16357d04..3a0bc2abf03935 100644
--- a/clang/lib/Driver/ToolChains/MinGW.cpp
+++ b/clang/lib/Driver/ToolChains/MinGW.cpp
@@ -307,7 +307,7 @@ void tools::MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA,
       if (Args.hasArg(options::OPT_pg))
         CmdArgs.push_back("-lgmon");
 
-      if (Args.hasArg(options::OPT_pthread))
+      if (!Args.hasArg(options::OPT_no_pthread))
         CmdArgs.push_back("-lpthread");
 
       if (Sanitize.needsAsanRt()) {



More information about the cfe-commits mailing list