[llvm] 5adcfd4 - [flang][CMake] Add missing dependency to generate Fortran module files (#91517)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 23:08:59 PDT 2024


Author: Michael Klemm
Date: 2024-05-09T08:08:55+02:00
New Revision: 5adcfd4c17826b2b8f023881baa1c7f79cb23920

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

LOG: [flang][CMake] Add missing dependency to generate Fortran module files (#91517)

Fixes bug https://github.com/llvm/llvm-project/issues/90769. Many thanks
to @Meinersbur for providing the initial thought and solution to this.

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 3020ba72f4a60..8a3ec1e3300d7 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -431,8 +431,10 @@ 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.
-      list(APPEND extra_deps "flang-new")
+      # 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)
       if(TARGET ${dep})


        


More information about the llvm-commits mailing list