[llvm] [LLVM][Support][Cygwin] Add threading support for Cygwin host (PR #145314)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 05:20:41 PDT 2025
================
@@ -316,7 +322,7 @@ static int computeHostNumHardwareThreads() {
if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(mask),
&mask) == 0)
return CPU_COUNT(&mask);
-#elif defined(__linux__)
+#elif (defined(__linux__) || defined(__CYGWIN__))
cpu_set_t Set;
CPU_ZERO(&Set);
if (sched_getaffinity(0, sizeof(Set), &Set) == 0)
----------------
mstorsjo wrote:
Ok, thanks!
https://github.com/llvm/llvm-project/pull/145314
More information about the llvm-commits
mailing list