Skip to content

Commit e915d9a

Browse files
authored
[flang] Do not create omp_lib.f18.mod files (llvm#156311)
The build system used to create `.f18.mod` variants for all `.mod` files, but this was removed in llvm#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.
1 parent 5256924 commit e915d9a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

flang/tools/f18/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,8 @@ if (NOT CMAKE_CROSSCOMPILING)
143143
${CMAKE_BINARY_DIR}/projects/openmp/runtime/src/omp_lib.F90
144144
DEPENDS flang ${FLANG_INTRINSIC_MODULES_DIR}/iso_c_binding.mod ${CMAKE_BINARY_DIR}/projects/openmp/runtime/src/omp_lib.F90 ${depends}
145145
)
146-
add_custom_command(OUTPUT ${base}.f18.mod
147-
DEPENDS ${base}.mod
148-
COMMAND ${CMAKE_COMMAND} -E copy ${base}.mod ${base}.f18.mod)
149-
add_custom_command(OUTPUT ${base}_kinds.f18.mod
150-
DEPENDS ${base}.mod
151-
COMMAND ${CMAKE_COMMAND} -E copy ${base}_kinds.mod ${base}_kinds.f18.mod)
152-
list(APPEND MODULE_FILES ${base}.mod ${base}.f18.mod ${base}_kinds.mod ${base}_kinds.f18.mod)
153-
install(FILES ${base}.mod ${base}.f18.mod ${base}_kinds.mod ${base}_kinds.f18.mod DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/flang" COMPONENT flang-module-interfaces)
146+
list(APPEND MODULE_FILES ${base}.mod ${base}_kinds.mod)
147+
install(FILES ${base}.mod ${base}_kinds.mod DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/flang" COMPONENT flang-module-interfaces)
154148
elseif ("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
155149
message(STATUS "OpenMP runtime support enabled via LLVM_ENABLE_RUNTIMES, assuming omp_lib.mod is built there")
156150
else()

0 commit comments

Comments
 (0)