From 53aa77092ea72b85bec0c8bb1ba11ed1f2f2eefe Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 4 Mar 2026 10:51:24 -0500 Subject: [PATCH] [flang] Fix distribution build of Fortran builtin/intrinsic modules. (#184204) Currently, `-DLLVM_DISTRIBUTION_COMPONENTS="flang-module-interfaces"` doesn't work. It failed to build the Fortran builtin/intrinsic modules as distribution build, `install-distribution`. This PR is to fix that. --- flang/tools/f18/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt index 74b329f6c6c0..900b341e85c5 100644 --- a/flang/tools/f18/CMakeLists.txt +++ b/flang/tools/f18/CMakeLists.txt @@ -142,8 +142,10 @@ if (NOT CMAKE_CROSSCOMPILING) else() message(WARNING "Not building omp_lib.mod, no OpenMP runtime in either LLVM_ENABLE_PROJECTS or LLVM_ENABLE_RUNTIMES") endif() + add_custom_target(flang-module-interfaces ALL DEPENDS module_files) add_llvm_install_targets(install-flang-module-interfaces COMPONENT flang-module-interfaces) + add_dependencies(install-flang-module-interfaces flang-module-interfaces) endif() add_custom_target(module_files ALL DEPENDS ${MODULE_FILES})