[Openmp-commits] [PATCH] D95371: [OpenMP] Use C++ to link libomp.so when LLVM libraries are included

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 25 11:55:26 PST 2021


AndreyChurbanov added a comment.



>> That's right. Regardless that the code is written in C++ the intention is to not have any dependency on C++ runtime. The libomp.so should work fine with C applications as well as with Fortran codes those often cannot link C++ runtime.
>
> Right. With profile support we got C++ dependences. So if you disable the profile support you can remove the dependence. What if we set the linker language to CXX if the profile support is enabled? Is that a problem?

But if profile support is enabled by default and will got into LLVM release, then people with pure C codes of Fortran codes will be surprised to see their OpenMP application depends on C++ runtime. 
E.g. if they provide Fortran redistributables with Fortran application, it won't work because of C++ runtime dependency. 
Or somebody may setup flang without clang, or gfortran without gcc, and link with libomp. 
Not sure it is immediate problem, but in length of time such things will happen.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95371



More information about the Openmp-commits mailing list