[Openmp-commits] [PATCH] D55725: [OpenMP] Add libs to clang-dedicated directories

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jan 25 08:42:22 PST 2019


jdenny added a comment.

In D55725#1371344 <https://reviews.llvm.org/D55725#1371344>, @protze.joachim wrote:

> In D55725#1370148 <https://reviews.llvm.org/D55725#1370148>, @jdenny wrote:
>
> > - `libgomp.so`, `libiomp5.so`: My understanding is that these symlinks exist solely for backward compatibility.  This patch currently doesn't affect them (doesn't bother to install them to Clang-dedicated directories).  Any reason to change that?
>
>
> From my perspective these names are not for backward compatibility, but to trick GNU and Intel compiler to use the LLVM/OpenMP runtime, when it is found before their own OpenMP runtime. By adding the path of libomp.so to the LIBRARY_PATH, gcc/icc will pick up the LLVM/OpenMP runtime during compilation.
>
> As long as libgomp does not implement OMPT and LLVM has no Fortran frontend, I would welcome the possibility to easily link this runtime into Fortran applications compiled with the GNU compiler.


On the one hand, it sounds like you're saying that putting these symlinks into Clang-dedicated directories would help your use case... because then you could easily raise their precedence for other compilers without raising the precedence of lots of other system libraries that happen to be installed in the same `lib` directory.  Is that right?  However, might it be harmful that you're also raising the precedence of other unrelated Clang libraries that also happen to be installed in the Clang-dedicated directory?

On the other hand, because this patch raises the precedence of Clang's libraries, this patch makes it harder to reverse your use case: to make Clang use another compiler's libraries.  Do we care?  Generally, making one compiler use another compiler's libraries probably ought to be harder than making the compiler use its own libraries correctly, so my guess is no.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D55725





More information about the Openmp-commits mailing list