[llvm] [openmp] Deprecate LLVM_ENABLE_PROJECTS in favor of LLVM_ENABLE_RUNTIMES (PR #124711)
Jan Patrick Lehr via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 11:22:51 PST 2025
jplehr wrote:
> > Flang currently only works with `LLVM_ENABLE_PROJECTS=openmp`:
> > https://github.com/llvm/llvm-project/blob/6d0dd3d5c41e5b564714de9226c0623012538051/flang/tools/f18/CMakeLists.txt#L144-L164
> >
> > Cannot remove it before Flang also supports LLVM_ENABLE_RUNTIMES=openmp
>
> Why does `flang` depend on OpenMP? It's not like `clang` does. If it's the runtime, hopefully we'll have that resolved with your patches since runtime builds can depend on other runtimes.
I believe this comes from Fortran module (`.mod`) files being compiler dependent. But they are also an integral part of the compiler. So, if `flang` wants to allow `use omp_lib` then it needs to have the OpenMP `.mod` file compiled. But it can/should/must (?) only do so when OpenMP is actually enabled.
I'm not saying that the way this is currently done is great, just trying to give a bit of context. @Meinersbur can likely correct me if I'm wrong.
https://github.com/llvm/llvm-project/pull/124711
More information about the llvm-commits
mailing list