[PATCH] D74654: Don't call computeHostNumPhysicalCores when LLVM_ENABLE_THREADS is off

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 14:57:34 PST 2020


akhuang created this revision.
akhuang added reviewers: rnk, aganea.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Fix change from 8404aeb56a73 <https://reviews.llvm.org/rG8404aeb56a73ab24f9b295111de3b37a37f0b841> to avoid calling
computeHostNumPhysicalCores if LLVM_ENABLE_THREADS is off.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74654

Files:
  llvm/lib/Support/Host.cpp


Index: llvm/lib/Support/Host.cpp
===================================================================
--- llvm/lib/Support/Host.cpp
+++ llvm/lib/Support/Host.cpp
@@ -1326,7 +1326,7 @@
   }
   return count;
 }
-#elif defined(_WIN32)
+#elif defined(_WIN32) && LLVM_THREADS_ENABLED
 // Defined in llvm/lib/Support/Windows/Threading.inc
 int computeHostNumPhysicalCores();
 #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74654.244777.patch
Type: text/x-patch
Size: 375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/e2de3804/attachment.bin>


More information about the llvm-commits mailing list