Don't call computeHostNumPhysicalCores when LLVM_ENABLE_THREADS is off

Summary:
Fix change from 8404aeb56a73 to avoid calling
computeHostNumPhysicalCores if LLVM_ENABLE_THREADS is off.

Reviewers: rnk, aganea

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74654
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp
index 7e772b2..371271e 100644
--- a/llvm/lib/Support/Host.cpp
+++ b/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