[PATCH] D39930: [CMake] Use libc++ and compiler-rt as default libraries in Fuchsia toolchain

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 18 18:16:21 PST 2017


phosek added a comment.

This is something I was already thinking about. Ideally, in our toolchain, we would build runtimes for all host and target platforms we support, i.e. on every host (Linux, macOS and Windows) we would build runtimes for i386, x86_64 and aarch64 Linux, x86_64 macOS, x86_64 Windows, and x86_64 and aarch64 Fuchsia. This means that the toolchain on every platform can target every other platform as long as you provide the right sysroot. However, there are two issues I'm aware of:

1. The compiler-rt build for host is different from the cross-target build: In the cross-target build, it only builds artifacts for the specified target triple. However, on Linux it always does a multilib build and on macOS it produces fat archives for all supported platforms.
2. Clang driver currently assumes that runtimes for host platform live in `<toolchain>/lib/`. In Fuchsia, we support runtimes being in `<toolchain>/lib/<triple>` but no other driver does.

To support what I described above, we would have to move to a setup when host platform isn't treated specially as it's today but it's just another triple. That's going to require some refactoring and cleanup. @beanz might have some opinion on this as well since this is something we already discussed before on IRC.


Repository:
  rL LLVM

https://reviews.llvm.org/D39930





More information about the cfe-commits mailing list