[flang-commits] [flang] [llvm] [Flang] Remove FLANG_INCLUDE_RUNTIME (PR #124126)

David Truby via flang-commits flang-commits at lists.llvm.org
Thu May 1 06:44:05 PDT 2025


================
@@ -149,6 +149,12 @@ if ("flang" IN_LIST LLVM_ENABLE_PROJECTS)
     message(STATUS "Enabling clang as a dependency to flang")
     list(APPEND LLVM_ENABLE_PROJECTS "clang")
   endif()
+
+  option(FLANG_ENABLE_FLANG_RT "Implicitly add LLVM_ENABLE_RUNTIMES=flang-rt when compiling Flang" ON)
+  if (FLANG_ENABLE_FLANG_RT AND NOT "flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
+    message(STATUS "Enabling Flang-RT as a dependency of Flang")
+    list(APPEND LLVM_ENABLE_RUNTIMES "flang-rt")
----------------
DavidTruby wrote:

I believe you can't `list(APPEND ..)` cache variables like this as they'll get overridden by what was provided on the command line. I think it should be `set(LLVM_ENABLE_RUNTIMES "${LLVM_ENABLE_RUNTIMES};flang-rt" CACHE INTERNAL "")` or something along those lines


https://github.com/llvm/llvm-project/pull/124126


More information about the flang-commits mailing list