diff options
Diffstat (limited to 'llvm/lib/Support/Threading.cpp')
-rw-r--r-- | llvm/lib/Support/Threading.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp index 415c63f245d..fd303afbb91 100644 --- a/llvm/lib/Support/Threading.cpp +++ b/llvm/lib/Support/Threading.cpp @@ -119,6 +119,9 @@ void llvm::llvm_execute_on_thread(void (*Fn)(void*), void *UserData, #endif unsigned llvm::hardware_physical_concurrency() { +#if !LLVM_ENABLE_THREADS + return 1; +#endif int NumPhysical = sys::getHostNumPhysicalCores(); if (NumPhysical == -1) return thread::hardware_concurrency(); |