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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to