[llvm] [LLVM][Support][Cygwin] Add threading support for Cygwin host (PR #145314)

Tomohiro Kashiwada via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 05:12:17 PDT 2025


================
@@ -338,7 +344,8 @@ llvm::BitVector llvm::get_thread_affinity_mask() {
 
 unsigned llvm::get_cpus() { return 1; }
 
-#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
+#if (defined(__linux__) || defined(__CYGWIN__)) &&                             \
+    (defined(__i386__) || defined(__x86_64__))
 // On Linux, the number of physical cores can be computed from /proc/cpuinfo,
----------------
kikairoya wrote:

It seems works.
```
$ head /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 1
model name      : AMD Ryzen 7 1700X Eight-Core Processor
stepping        : 1
microcode       : 0x8001137
cpu MHz         : 3400.000
cache size      : 16384 KB
physical id     : 0
```

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


More information about the llvm-commits mailing list