MINGW-packages/mingw-w64-llvm-16/0003-add-pthread-as-system-lib-for-mingw.patch
2025-01-23 09:34:32 +01:00

27 lines
890 B
Diff

From 9102055df75457e1194008ce6152221112a785ad Mon Sep 17 00:00:00 2001
From: Mateusz Mikula <mati865@gmail.com>
Date: Tue, 14 Mar 2017 17:50:29 +0100
Subject: [PATCH 5/5] add pthread as system lib for mingw
---
lib/Support/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt
index 0a8e3897cce..de9cda5dda3 100644
--- a/lib/Support/CMakeLists.txt
+++ b/lib/Support/CMakeLists.txt
@@ -6,6 +6,9 @@ set(system_libs)
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
# advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32)
+ if( MINGW )
+ set(system_libs ${system_libs} pthread)
+ endif()
elseif( CMAKE_HOST_UNIX )
if( HAVE_LIBRT )
set(system_libs ${system_libs} rt)
--
2.13.3