Skip to content

Commit 5adcfd4

Browse files
authored
[flang][CMake] Add missing dependency to generate Fortran module files (#91517)
Fixes bug #90769. Many thanks to @Meinersbur for providing the initial thought and solution to this.
1 parent 2a57657 commit 5adcfd4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,10 @@ if(runtimes)
431431
set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang")
432432
# TODO: This is a workaround until flang becomes a first-class project
433433
# in llvm/CMakeList.txt. Until then, this line ensures that flang-new is
434-
# built before "openmp" is built as a runtime project.
435-
list(APPEND extra_deps "flang-new")
434+
# built before "openmp" is built as a runtime project. Besides "flang-new"
435+
# to build the compiler, we also need to add "module_files" to make sure
436+
# that all .mod files are also properly build.
437+
list(APPEND extra_deps "flang-new" "module_files")
436438
endif()
437439
foreach(dep opt llvm-link llvm-extract clang clang-offload-packager)
438440
if(TARGET ${dep})

0 commit comments

Comments
 (0)