[PATCH] D101960: [openmp] Drop requirement on library path environment variables
Jon Chesterfield via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 6 09:26:55 PDT 2021
JonChesterfield added a comment.
Yes. Libomp and libomptarget are in the same directory, so the rpath/runpath change catches both of them. Libomptarget then needs to find the plugins to load, either through library path or something equivalent to the above.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:648
+void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
+ const ArgList &Args,
----------------
lebedev.ri wrote:
> JonChesterfield wrote:
> > Similar to other functions in this file, derived from aomp (by deleting some stuff for finding a debug version of the library)
> >
> > I can make my peace with runpath instead if people are keen to override this with LD_LIBRARY_PATH. The rest of clang's toolchains wire things up with rpath but that doesn't mean we have to make the same choice here.
> I think it would be a shame if this would be the only thing
> that *doesn't* support being overriden with `LD_LIBRARY_PATH`.
> I'm not sure about `libomptarget`, but it i think it would be good to keep such possibility for `libomp`.
The search order is 'rpath' then 'LD_LIBRARY_PATH' then 'runpath'. Presently we set no default at all and require the user to set LD_LIBRARY_PATH or manually link the right library. So using runpath here is backwards compatible, in that all the scripts out there that use LD_LIBRARY_PATH will continue to work. That may force our hand here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101960/new/
https://reviews.llvm.org/D101960
More information about the cfe-commits
mailing list