[libcxx-commits] [PATCH] D101959: [libc++/abi/unwind][AIX] Add scripts and cache file for building libc++/libc++abi/libunwind

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 7 15:14:16 PDT 2021


phosek added a subscriber: beanz.
phosek added a comment.

In D101959#2745022 <https://reviews.llvm.org/D101959#2745022>, @ldionne wrote:

> Hmm, this one hurts. The thing here is that I completely understand why you followed the lead of `apple-install-libcxx.sh`, however the truth is that that script is a hack for not being able to do what we want from CMake. It would be awesome if we could find a less ad-hoc way of doing this (both for you folks and for the Apple version).
>
> @phosek, using the Runtimes build, would it be possible to build libc++ for 64 and 32 bits, and merge those? And is it possible to use the runtimes build without bootstrapping Clang first, i.e. with the system compiler?

Yes, it's something I'm actively looking into right now for Apple platforms since we want to ship libc++ as universal library in our toolchain. @beanz  suggested using `CMAKE_OSX_ARCHITECTURES` and after some experimentation, I'm convinced that it's possible with a bit of CMake refactoring. Right now the blocker is some of the post-processing like the support for merging libc++abi and libc++ archives since `utils/merge_archives.py` doesn't work for universal archives, but that can be solved by using object libraries.

Unfortunately, CMake as far as I'm aware doesn't have any support for XCOFF or AIX so it's unlikely to help in this case. We could consider implementing a more general support in the runtimes build where you could run multiple target builds and then combine their results, but it's still likely going to require some platform-specific logic since there's no standard way of creating universal binaries.

To your second question, yes it's possible. If you build `${LLVM_MONOREPO}/runtimes` as your CMake project, you can use arbitrary host compiler.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101959



More information about the libcxx-commits mailing list