[Openmp-commits] [PATCH] D142369: [Libomptarget] Emit a special warning when no images are found

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 17 09:37:54 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG27a2940b8cae: [Libomptarget] Emit a special warning when no images are found (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142369

Files:
  openmp/libomptarget/src/omptarget.cpp


Index: openmp/libomptarget/src/omptarget.cpp
===================================================================
--- openmp/libomptarget/src/omptarget.cpp
+++ openmp/libomptarget/src/omptarget.cpp
@@ -274,6 +274,17 @@
         FAILURE_MESSAGE("Consult https://openmp.llvm.org/design/Runtimes.html "
                         "for debugging options.\n");
 
+      if (PM->RTLs.UsedRTLs.empty()) {
+        llvm::SmallVector<llvm::StringRef> Archs;
+        llvm::transform(PM->Images, std::back_inserter(Archs),
+                        [](const auto &x) {
+                          return !x.second.Arch ? "empty" : x.second.Arch;
+                        });
+        FAILURE_MESSAGE(
+            "No images found compatible with the installed hardware. ");
+        fprintf(stderr, "Found (%s)\n", llvm::join(Archs, ",").c_str());
+      }
+
       SourceInfo Info(Loc);
       if (Info.isAvailible())
         fprintf(stderr, "%s:%d:%d: ", Info.getFilename(), Info.getLine(),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142369.506118.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230317/7438bee8/attachment-0001.bin>


More information about the Openmp-commits mailing list