[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.
This commit is contained in:
Nikita Popov 2025-09-03 09:53:10 +02:00 committed by GitHub
parent 5256924acc
commit e915d9adde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()