diff --git a/llvm/unittests/Support/Threading.cpp b/llvm/unittests/Support/Threading.cpp --- a/llvm/unittests/Support/Threading.cpp +++ b/llvm/unittests/Support/Threading.cpp @@ -20,6 +20,7 @@ namespace { static bool isThreadingSupportedArchAndOS() { +#if LLVM_ENABLE_THREADS Triple Host(Triple::normalize(sys::getProcessTriple())); // Initially this is only testing detection of the number of @@ -29,6 +30,9 @@ (Host.isX86() && Host.isOSLinux()) || (Host.isOSLinux() && !Host.isAndroid()) || (Host.isSystemZ() && Host.isOSzOS()); +#else + return false; +#endif } TEST(Threading, PhysicalConcurrency) {