[llvm] [flang-rt] Remove hard-coded dependency on compiler-rt path on Windows (PR #150244)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 24 05:08:59 PDT 2025


https://github.com/Meinersbur approved this pull request.

> Flang already links compiler-rt on Windows 

But Clang does not, and Flang-RT consists of mostly C/C++ files which Clang emits calls to `__udivti3` into.

"Mostly", because flang_rt.runtime has `iso_fortran_env_impl.f90` which is compiled using Fortran which should already add `--dependent-lib=..` into flang_rt.runtime. 

While theoretically CMAKE_Fortran_COMPILER could be another compiler, and I would prefer to have the dependency in a central location (i.e. removing flang implicitly adding a dependency to compile_rt.builtins but make it link transitively through flang_rt), that's probably too idealistic. I would have suggested to at least add `--dependent-libs=flang_rt.runtime.<triple>.lib` without path, but it should not matter in practice.

LGTM

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


More information about the llvm-commits mailing list