[clang] [flang] [llvm] [flang][AArch64] Always link compiler-rt to flang after libgcc (PR #144710)

David Truby via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 10:02:49 PDT 2025


================
@@ -653,6 +653,13 @@ if(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD STREQUAL "all")
   set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ${LLVM_ALL_EXPERIMENTAL_TARGETS})
 endif()
 
+if("flang" IN_LIST LLVM_ENABLE_PROJECTS AND 
+   "AArch64" IN_LIST LLVM_TARGETS_TO_BUILD AND
+   NOT "compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES)
+  message(STATUS "Enabling Flang-RT as a dependency of Flang")
+  list(APPEND LLVM_ENABLE_RUNTIMES "compiler-rt")
----------------
DavidTruby wrote:

I'm not sure we actually can; that doesn't get set until later on. It shouldn't matter though - this cmake will _only_ kick in when compiler-rt isn't in LLVM_ENABLE_RUNTIMES, and COMPILER_RT_BUILD_BUILTINS defaults to ON anyway. So adding it here would only protect against the case where someone is passing flags to configure compiler-rt even though it's not in their LLVM_ENABLE_RUNTIMES, which seems unlikely.

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


More information about the llvm-commits mailing list