[Openmp-commits] [PATCH] D102043: [libomptarget] Look for plugins next to libomptarget.so

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 26 11:34:13 PDT 2021

jdoerfert added a comment.

In D102043#2967651 <https://reviews.llvm.org/D102043#2967651>, @JonChesterfield wrote:

> The phab comment no longer makes sense but the code is right I think. The semantic change here is to ignore the various dynamic search mechanisms when looking for the plugin in favour of using the plugin that is next to libomptarget. That means whatever method found libomptarget also specifies the plugin, even if it was one of the methods that doesn't work transitively.

I c. This needs discussion Wednesday though. I am not sure there is a problem changing the default behavior but I want to hear out others.

> If `dladdr((void *)&__tgt_register_lib..` fails, this path gives up. I don't know of a reason why it would fail, but if something is going wrong there, trying to find some other plugin instead seems unlikely to help the user debug it.

If this should not fail, please make it a proper error output. There is no point in it silently not finding plugins and people being all confused about it.

> The control flow would be slightly more obvious here if the loop was unswitched, but the indentation change will hurt readability of the diff. I'd like to put if (var == "") in front of the loop as a follow up NFC patch.

The select in the loop is not necessary, if no path for libomptarget was found, error message and out.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list