[flang-commits] [flang] [flang] Do not create omp_lib.f18.mod files (PR #156311)
Nikita Popov via flang-commits
flang-commits at lists.llvm.org
Mon Sep 1 04:01:27 PDT 2025
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/156311
The build system used to create `.f18.mod` variants for all `.mod` files, but this was removed in #85249. However, there is a leftover that still creates these when building `openmp` in the project configuration. It does not happen in the runtimes configuration.
>From c8e6aa7960e7ee1a880b37686b2424a8b38b5587 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Mon, 1 Sep 2025 12:57:54 +0200
Subject: [PATCH] [flang] Do not create omp_lib.f18.mod files
The build system used to create `.f18.mod` variants for all `.mod`
files, but this was removed in #85249. However, there is a leftover
that still creates these when building `openmp` in the project
configuration. It does not happen in the runtimes configuration.
---
flang/tools/f18/CMakeLists.txt | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index 546b6acaaf91d..715992c756c4b 100644
--- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt
@@ -143,14 +143,8 @@ if (NOT CMAKE_CROSSCOMPILING)
${CMAKE_BINARY_DIR}/projects/openmp/runtime/src/omp_lib.F90
DEPENDS flang ${FLANG_INTRINSIC_MODULES_DIR}/iso_c_binding.mod ${CMAKE_BINARY_DIR}/projects/openmp/runtime/src/omp_lib.F90 ${depends}
)
- add_custom_command(OUTPUT ${base}.f18.mod
- DEPENDS ${base}.mod
- COMMAND ${CMAKE_COMMAND} -E copy ${base}.mod ${base}.f18.mod)
- add_custom_command(OUTPUT ${base}_kinds.f18.mod
- DEPENDS ${base}.mod
- COMMAND ${CMAKE_COMMAND} -E copy ${base}_kinds.mod ${base}_kinds.f18.mod)
- list(APPEND MODULE_FILES ${base}.mod ${base}.f18.mod ${base}_kinds.mod ${base}_kinds.f18.mod)
- install(FILES ${base}.mod ${base}.f18.mod ${base}_kinds.mod ${base}_kinds.f18.mod DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/flang" COMPONENT flang-module-interfaces)
+ list(APPEND MODULE_FILES ${base}.mod ${base}_kinds.mod)
+ install(FILES ${base}.mod ${base}_kinds.mod DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/flang" COMPONENT flang-module-interfaces)
elseif ("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
message(STATUS "OpenMP runtime support enabled via LLVM_ENABLE_RUNTIMES, assuming omp_lib.mod is built there")
else()
More information about the flang-commits
mailing list