[PATCH] D139015: [Threading] Ensure Tests Reflect Disabled Threads

Sam Elliott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 09:03:37 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG02efd7d2716a: [Threading] Ensure Tests Reflect Disabled Threads (authored by lenary).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139015/new/

https://reviews.llvm.org/D139015

Files:
  llvm/unittests/Support/Threading.cpp


Index: llvm/unittests/Support/Threading.cpp
===================================================================
--- llvm/unittests/Support/Threading.cpp
+++ 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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139015.478975.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221130/d103022e/attachment.bin>


More information about the llvm-commits mailing list