Skip to content

Commit 901006f

Browse files
authored
[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.
1 parent 933fc63 commit 901006f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/tools/f18/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ if (NOT CMAKE_CROSSCOMPILING)
7272
set(depends ${FLANG_INTRINSIC_MODULES_DIR}/__cuda_builtins.mod)
7373
else()
7474
set(depends ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_builtins.mod)
75-
if(NOT ${filename} STREQUAL "__fortran_type_info")
76-
set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_type_info.mod)
77-
endif()
7875
if(${filename} STREQUAL "iso_fortran_env")
7976
set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/iso_fortran_env_impl.mod)
8077
endif()
@@ -83,6 +80,9 @@ if (NOT CMAKE_CROSSCOMPILING)
8380
set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_ieee_exceptions.mod)
8481
endif()
8582
endif()
83+
if(NOT ${filename} STREQUAL "__fortran_type_info")
84+
set(depends ${depends} ${FLANG_INTRINSIC_MODULES_DIR}/__fortran_type_info.mod)
85+
endif()
8686

8787
# The module contains PPC vector types that needs the PPC target.
8888
if(${filename} STREQUAL "__ppc_intrinsics" OR

0 commit comments

Comments
 (0)