Updating the way we build `compiler-rt` in `build-script`

Good morning everyone,
We are changing build-script to use the LLVM-recommended way to build compiler-rt, since the current way will be removed in LLVM-21 1 2 3 -- we are planning for this transition to be as seamless as possible, but regardless we want to share how we are planning to carry this out:

  1. add the new logic but keep it disabled for now
  2. test the enablement with PR testing and toolchain builds
  3. enable the new logic by default, and assess any fallout in CI
    • we are keeping the old logic, so that affected configurations can temporarily revert to that using --llvm-build-compiler-rt-with-use-runtimes=0 while we fix the underlying issues
  4. after all regressions are tackled, remove the old logic together with the flag

We are currently aiming at landing the new logic disabled in the next week or two to allow time for feedback; shortly after this, we will start testing the enablement; we will then schedule the enablement by default depending on how many fixes the new logic needs.

2 Likes

We just merged https://github.com/swiftlang/swift/pull/80174 to main -- now we are starting testing the enablement by default in Use LLVM_USE_RUNTIMES to build compiler-rt by default by edymtt · Pull Request #80253 · swiftlang/swift · GitHub.