[flang-commits] [flang] 901006f - [flang] Make flang module hidden dependency explicit to correct build… (#108129)

via flang-commits flang-commits at lists.llvm.org
Tue Sep 10 18:45:09 PDT 2024


Author: Peter Klausler
Date: 2024-09-10T18:45:06-07:00
New Revision: 901006f238aae8dd7e75d173bf9429e8e44f6385

URL: https://github.com/llvm/llvm-project/commit/901006f238aae8dd7e75d173bf9429e8e44f6385
DIFF: https://github.com/llvm/llvm-project/commit/901006f238aae8dd7e75d173bf9429e8e44f6385.diff

LOG: [flang] Make flang module hidden dependency explicit to correct build… (#108129)

… failure

Any flang module with a derived type definition implicitly depends on
flang/module/__fortran_type_info.f90. Make this dependency explicit so
that an unlucky build order doesn't cause a crash.

Added: 
    

Modified: 
    flang/tools/f18/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index 344a781c41e957..4670362f7a103c 100644
--- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt
@@ -72,9 +72,6 @@ if (NOT CMAKE_CROSSCOMPILING)
       set(depends ${FLANG_INTRINSIC_MODULES_DIR}/__cuda_builtins.mod)
     else()
       set(depends ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_builtins.mod)
-      if(NOT ${filename} STREQUAL "__fortran_type_info")
-        set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_type_info.mod)
-      endif()
       if(${filename} STREQUAL "iso_fortran_env")
         set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/iso_fortran_env_impl.mod)
       endif()
@@ -83,6 +80,9 @@ if (NOT CMAKE_CROSSCOMPILING)
         set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_ieee_exceptions.mod)
       endif()
     endif()
+    if(NOT ${filename} STREQUAL "__fortran_type_info")
+      set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_type_info.mod)
+    endif()
 
     # The module contains PPC vector types that needs the PPC target.
     if(${filename} STREQUAL "__ppc_intrinsics" OR


        


More information about the flang-commits mailing list