[Openmp-commits] [openmp] [OpenMP] Install the Fortran module files with libomp-mod (PR #227116)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Sep 28 14:07:28 PDT 2026


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/227116

Summary:
The `libomp-mod` install component only contains `omp_lib.h`. The module
files are only installed incidentally as part of the Fortran runtime or
directory copy. Just do this directly. These were intentinoally dropped
in https://github.com/llvm/llvm-project/pull/171515, in favor of the
directory copy. However, this means these are ignored when done through
the specific component target.

Shouldn't affect plain installs.


>From 50ca87b5a9f8027289f20d775fdff181888cd429 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Mon, 28 Sep 2026 15:48:51 -0500
Subject: [PATCH] [OpenMP] Install the Fortran module files with libomp-mod

Summary:
The `libomp-mod` install component only contains `omp_lib.h`. The module
files are only installed incidentally as part of the Fortran runtime or
directory copy. Just do this directly. These were intentinoally dropped
in https://github.com/llvm/llvm-project/pull/171515, in favor of the
directory copy. However, this means these are ignored when done through
the specific component target.

Shouldn't affect plain installs.
---
 openmp/module/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/openmp/module/CMakeLists.txt b/openmp/module/CMakeLists.txt
index 2d9829e84849a..3d7128dee1117 100644
--- a/openmp/module/CMakeLists.txt
+++ b/openmp/module/CMakeLists.txt
@@ -36,6 +36,8 @@ flang_module_target(libomp-mod PUBLIC)
 
 install(FILES
   "${RUNTIMES_OUTPUT_RESOURCE_MOD_DIR}/omp_lib.h"
+  "${RUNTIMES_OUTPUT_RESOURCE_MOD_DIR}/omp_lib.mod"
+  "${RUNTIMES_OUTPUT_RESOURCE_MOD_DIR}/omp_lib_kinds.mod"
   DESTINATION "${RUNTIMES_INSTALL_RESOURCE_MOD_PATH}"
   COMPONENT libomp-mod
   EXCLUDE_FROM_ALL



More information about the Openmp-commits mailing list