[flang-commits] [clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

Michael Kruse via flang-commits flang-commits at lists.llvm.org
Thu Jul 17 06:24:32 PDT 2025


Meinersbur wrote:

> What's the main limitation here? If this is just a file dependency it should be identical to how all the OpenMP tests depend on `omp.h` being in the resource directory.

`omp.h` is created by `configure_file` at configure time. No dependency other than `runtimes-configure` needed.

> IMHO this is trivial if we do a runtimes build, since we can just require that `openmp;flang-rt` are in the same toolchain, 

With toolchain you mean a bootstrapping build with `LLVM_ENABLE_RUNTIMES=openmp;flang-rt` ? Don't forget the users of a Flang-standalone build (`cmake -S <llvm-project>/flang`).

> which then gives us well defined access to `openmp`'s CMake targets so long as it's listed before `flang-rt`.

`check-flang` (LLVM_ENABLE_PROJECTS=flang) needs access to `libomp.mod` (LLVM_ENABLE_RUNTIMES=openmp) and the flang modules as well to work.


https://github.com/llvm/llvm-project/pull/137828


More information about the flang-commits mailing list