}
return count;
}
-#elif defined(_WIN32) && LLVM_THREADS_ENABLED
+#elif defined(_WIN32) && LLVM_ENABLE_THREADS != 0
// Defined in llvm/lib/Support/Windows/Threading.inc
int computeHostNumPhysicalCores();
#else
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
+#include "llvm/Support/Threading.h"
#include "gtest/gtest.h"
// Initially this is only testing detection of the number of
// physical cores, which is currently only supported/tested for
// x86_64 Linux and Darwin.
- return Host.isOSWindows() ||
+ return (Host.isOSWindows() && llvm_is_multithreaded()) ||
(Host.getArch() == Triple::x86_64 &&
(Host.isOSDarwin() || Host.getOS() == Triple::Linux));
}