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

David Tenty via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 10 13:13:26 PDT 2021

daltenty added a comment.

In D101959#2745480 <https://reviews.llvm.org/D101959#2745480>, @phosek wrote:

> 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.

When reviews open on this refactoring, we'd definitely be interested reviewing. Hopefully we'd be able to re-use some of that setup to solve this problem as well.

> 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.

Yes, this is something we always wish there was better native CMake support for 🙂 (maybe getting a CMake property setup similar to CMAKE_OSX_ARCHITECTURES is worth investigating) . Refactoring the runtimes build is possible but IIUC if Apple targets end up using CMAKE_OSX_ARCHITECTURES instead seems like AIX would be the only interested target?

I think a side question is, there is definitely a desire to do something better here, but neither of the above options is going . Should this script still proceed so there is something available within the LLVM 13 timeframe?

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list