From a3030bd77c3aed6a405331b8307bdf66f21f4e51 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 8 May 2024 20:28:19 +0200 Subject: [PATCH 1/2] Add missing dependency to generate Fortran module files --- llvm/runtimes/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 3020ba72f4a60..29112ccb6df15 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -432,7 +432,7 @@ if(runtimes) # TODO: This is a workaround until flang becomes a first-class project # in llvm/CMakeList.txt. Until then, this line ensures that flang-new is # built before "openmp" is built as a runtime project. - list(APPEND extra_deps "flang-new") + list(APPEND extra_deps "flang-new" "module_files") endif() foreach(dep opt llvm-link llvm-extract clang clang-offload-packager) if(TARGET ${dep}) From 245443850c3226b42421259921de18eb77270204 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 8 May 2024 21:09:26 +0200 Subject: [PATCH 2/2] Be a bit more verbose about added dependency --- llvm/runtimes/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 29112ccb6df15..8a3ec1e3300d7 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -431,7 +431,9 @@ if(runtimes) set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang") # TODO: This is a workaround until flang becomes a first-class project # in llvm/CMakeList.txt. Until then, this line ensures that flang-new is - # built before "openmp" is built as a runtime project. + # built before "openmp" is built as a runtime project. Besides "flang-new" + # to build the compiler, we also need to add "module_files" to make sure + # that all .mod files are also properly build. list(APPEND extra_deps "flang-new" "module_files") endif() foreach(dep opt llvm-link llvm-extract clang clang-offload-packager)