[libc-commits] [compiler-rt] [libc] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [runtimes][CMake] Move Fortran support code from flang-rt (PR #171610)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Thu Apr 9 01:04:20 PDT 2026
================
@@ -270,6 +270,14 @@ cmake_path(NORMAL_PATH RUNTIMES_OUTPUT_RESOURCE_LIB_DIR)
cmake_path(NORMAL_PATH RUNTIMES_INSTALL_RESOURCE_LIB_PATH)
+# Handle Fortran code. When a Fortran toolchain is available and required by
+# one or more of the runtimes, enables CMake's Fortran support and sets
+# RUNTIMES_ENABLE_FORTRAN and RUNTIMES_ENABLE_FLANG_MODULES.
+# Makes use of RUNTIMES_OUTPUT_RESOURCE_DIR, RUNTIMES_INSTALL_RESOURCE_PATH,
+# hence must be included their those variables are defined.
+include(config-Fortran)
----------------
petrhosek wrote:
```suggestion
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES OR "openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
include(config-Fortran)
endif ()
```
https://github.com/llvm/llvm-project/pull/171610
More information about the libc-commits
mailing list