[libcxx-commits] [PATCH] D111356: [runtimes] Use the new "runtimes" build by default and deprecate other builds

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 11 23:58:26 PDT 2021


mstorsjo added a comment.

In D111356#3056624 <https://reviews.llvm.org/D111356#3056624>, @loic.yhuel wrote:

> Would several separate runtime builds with each time one project in `LLVM_ENABLE_RUNTIMES` work, to replace standalone builds ?
>
> For custom embedded toolchains, there is sometime the need to do things in a specific order for bootstrapping :
>
> - cmake on libcxx
> - install libcxx headers
> - cmake, build and install libunwind
> - cmake and build libcxxabi
> - build libcxx
>
> IIRC, even with `CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY`, there is still the need to install certain headers for the cmake compile tests to work.
>
> Sometimes there are also :
>
> - custom `CXXFLAGS`/`LDFLAGS` for one project
> - custom install steps (symlinks, linker scripts)
>
> They could be needed for example to generate a gcc-like runtime on a Linux target for use by both clang and gcc : importing `__gcc_personality_v0` in libunwind to allow it to replace `libgcc_s.so.1` for glibc, `libgcc_eh.a` and `libgcc_s.so` linker scripts, ...

There's of course nothing stopping you from configuring them one at a time that way, but based on earlier comments from @ldionne, the tricky options for hooking up separate standalone builds of libcxxabi and libcxx to each other would be deprecated.

These days, libunwind can be built without C++ standard library headers, so that one can be built entirely untangled from libcxxabi/libcxx. (Ideally it should be buildable in the same invocation as all the other ones too, but when bootstrapping toolchains from scratch, where libunwind is necessary for the libcxx cmake tests to succeed, you might need to build it first before doing cmake for libcxx.)

Some amount of these interdependencies (e.g. libunwind requiring standard C++ library headers) have been fixed in the last few years, so it might be good to revisit the procedure and see how much trickery is needed now. I think the most vital bit is that you should be able to build libcxxabi and libcxx in the same cmake invocation without specifying options for them to find each other.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111356



More information about the libcxx-commits mailing list