[llvm] [flang-rt] Update `test_flang` in CI to use `flang-rt` as one of the projects. (PR #135260)

Daniel Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 20:39:03 PDT 2025


DanielCChen wrote:

> > The intention of this PR is to prevent building flang-rt as part of the flang build. Rather, build it with LLVM_ENABLE_RUNTIMES. This is how the buildbot is doing.
> 
> > As the flang-rt build is similar to compiler-rt, I mimicked compiler-rt in this PR. I am not sure if I missed anything or overdid anything.
> 
> That's not how the premerge build system is setup. The list of projects computed here gets sent directly to `monolithic-linux.sh` and `monolithic-windows.sh` which you can see in `generate-buildkite-pipeline-premerge` and `.github/workflows/premerge.yaml`. Those scripts just shove everything into `LLVM_ENABLE_PROJECTS`. We need to migrate `compiler-rt` and `libc` off of the projects build, but haven't done it yet as I need to dig into the host toolchain support story there.
> 
> What's the compiler support story like for `flang-rt`? Is it fine to build it with a recent clang or does it need to be built with the just-built compiler? Is it going to have fortran source eventually (or does it already)?

I see. 
Right, both `compiler-rt` and `flang-rt` should not be in `LLVM_ENABLE_PROJECTS` in the premerge build. 
In the buildbots, they are in `LLVM_ENABLE_RUNTIMES` for the in-tree build.

If I have `LLVM_ENABLE_PROJECTS=clang`, `compiler-rt` is not built. However, if I have `LLVM_ENABLE_PROJECTS=flang`, `flang-rt` is built as part of the flang project.

I see the premerge scripts only use `LLVM_ENABLE_PROJECTS` but not `LLVM_ENABLE_RUNTIMES`. It always build runtimes as a standalone build.

I start to think the proper fix probably should be that we stop building `flang-rt` as part of the flang project in cmake, and uses standalone runtime premerge build when testing flang or flang-rt changes.



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


More information about the llvm-commits mailing list