[Openmp-commits] [PATCH] D77609: [OpenMP] Added the support for hidden helper task in RTL

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Mar 17 08:15:23 PDT 2021

protze.joachim added a comment.

In D77609#2631803 <https://reviews.llvm.org/D77609#2631803>, @lebedev.ri wrote:

> In D77609#2631767 <https://reviews.llvm.org/D77609#2631767>, @protze.joachim wrote:
>> In D77609#2629372 <https://reviews.llvm.org/D77609#2629372>, @lebedev.ri wrote:
>>> I believe this involves compiling a program that uses omp with clang, linking it to llvm's libomp,
>>> and linking it to some library that is compiled with gcc and linked to libgomp.
>>> The issue appears to happen regardless of whether or not the libgomp used is provided at runtime by gcc or llvm.
>> Linking two OpenMP runtime libraries into one application is guaranteed to break things. You have basically no way to guarantee that calls to API functions go to the right runtime.
> Presumably you have read my comment in it's entirety, and did see that both libgomp and libomp used are from llvm?
> What's the point of llvm's libgomp then?

My point was on this specific part:

> whether or not the libgomp used is provided at runtime by gcc or llvm

You explicitly listed the case that libgomp from gcc is loaded at execution time. The most tedious issues I had with a third-party library, which is statically linked against libgomp. You won't spot the gcc libgomp with ldd.

As long as you make sure that only the LLVM OpenMP runtime is loaded during execution, it should work, yes.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list