[flang-commits] [flang] e915d9a - [flang] Do not create omp_lib.f18.mod files (#156311)

via flang-commits flang-commits at lists.llvm.org
Wed Sep 3 00:53:13 PDT 2025


Author: Nikita Popov
Date: 2025-09-03T09:53:10+02:00
New Revision: e915d9addeae5431f869d9a10021382871c11169

URL: https://github.com/llvm/llvm-project/commit/e915d9addeae5431f869d9a10021382871c11169
DIFF: https://github.com/llvm/llvm-project/commit/e915d9addeae5431f869d9a10021382871c11169.diff

LOG: [flang] Do not create omp_lib.f18.mod files (#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.

Added: 
    

Modified: 
    flang/tools/f18/CMakeLists.txt

Removed: 
    


################################################################################
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