[Openmp-commits] [PATCH] D109061: [openmp] No longer use LIBRARY_PATH to find devicertl

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 1 12:55:49 PDT 2021

tianshilei1992 added a comment.

In D109061#2977714 <https://reviews.llvm.org/D109061#2977714>, @JonChesterfield wrote:

> Using LIBRARY_PATH to find the bitcode is a reasonable interpretation of LIBRARY_PATH but it's a disaster in terms of using clang on a system that has LIBRARY_PATH pointing at some other version of clang. Rpath will be ignored by the bitcode lib handling.
> How does this break under standalone? It uses the same config.variable that is used for LIBRARY_PATH at the moment, so it looks in exactly the same place as before this patch

OpenMP libraries don't always sit next to `clang`'s default library path. For standalone build, the installation path of OpenMP can be different from that of LLVM. Before this patch, `clang` can find the library as long as `openmp/lib` is in `LIBRARY_PATH`. Now it can never find it except we pass the path explicitly to the compilation command line. I understand your argument that `clang` might find a wrong one, but it's user's responsibility to make sure the expected version should be on the top of `LIBRARY_PATH`.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list