[libcxx-commits] [PATCH] D109593: WIP: [libcxx] Add a CI configuration for standalone building in llvm-project/runtimes

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 21 23:27:53 PDT 2021


phosek added a comment.

In D109593#3014343 <https://reviews.llvm.org/D109593#3014343>, @mstorsjo wrote:

> In D109593#3013819 <https://reviews.llvm.org/D109593#3013819>, @ldionne wrote:
>
>> That is fine with me.
>>
>> I want to standardize around exactly two types of supported builds:
>>
>> 1. Using `<root>/runtimes` as a CMake root.
>> 2. Using `<root>/llvm` as a CMake root and mentioning `LLVM_ENABLE_RUNTIMES=....`. That is effectively bootstrapping Clang and building the runtimes with the just-built compiler.
>>
>> In particular, I want to remove the ability to use `<root>/llvm` as a CMake root and say `LLVM_ENABLE_PROJECTS=libcxx,libcxxabi,libunwind` as a way of building, since that has a bunch of problems.
>>
>> Are we on the same page? If so, we'll also want to improve on the terrible terminology we have today. (2) is currently called a "runtimes build", and (1) has no name. I would suggest we call (1) a "build of the runtimes", or just a "normal build", and that we rename (2) to a "bootstrapping build" or something like that.
>
> That sounds like a good general direction. Distributors of llvm and the runtimes are going to need a decent sized transition period though.
>
> For people using `LLVM_ENABLE_PROJECTS`, I would believe it should be straightforward for them to migrate. The bigger disruption is going to be when/if we stop allowing building the runtime projects entirely on their own by pointing cmake directly at e.g. libcxx. Judging from last weeks LLVM Distributors Conference, I would say that's the way a majority of distributors build it today, and transitioning that into e.g. 1. above will take some effort in the more complex cases. And some of them build this way with standalone source dirs without the surrounding monorepo, e.g. cc @tstellar.

+1 to everything said above.

Another thing I'd point out is that we may want to rethink the use of `LLVM_ENABLE_RUNTIMES` and `<root>/llvm/runtimes`. In the bootstrapping build, we want to build Clang and then use to build runtimes, but LLVM isn't aware of Clang, Clang depends on LLVM. To give you a concrete example, if you used `-DLLVM_ENABLE_PROJECTS=llvm -DLLVM_ENABLE_RUNTIMES=all`, it's not clear what should happen since there's no Clang being built.

I think that in the long run, it'd be better if the bootstrapping build had moved either into Clang or even to the very top-level  of the monorepo (that is `<root>/CMakeLists.txt`) since in practice you'll also want a linker, and possibly Flang and other tools.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109593/new/

https://reviews.llvm.org/D109593



More information about the libcxx-commits mailing list