[PATCH] D32816: [CMake] Support multi-target runtimes build

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 23:47:32 PDT 2017


phosek added a comment.

I have implemented the latter solution, adding `<RUNTIME>_INSTALL_PATH` to libunwind, libc++abi, libc++ and it's working. The headers in this case are installed to `/lib/$target/include` and libraries to `/lib/$target/lib`, except for compiler-rt where headers are installed to `/lib/clang/$version/include` and libraries to `/lib/clang/$version/lib` as today. The changes required to Clang drivers are going to be similar to https://reviews.llvm.org/D32613. It's little strange for headers to be `/lib`, but this is already the case for compiler-rt today, so this solution follows the same pattern. I'd be happy to upload all the patches if this solution is fine with you.

Splitting libraries and headers, e.g. into `/lib/$target` and `/include/$target`, would require introducing pair of variables to each runtime, e.g. `<RUNTIME>_HEADER_INSTALL_PATH` and `<RUNTIME>_LIBRARY_INSTALL_PATH`. Unfortunately, I don't think we can shared headers between targets because libc++ generates target specific `__config` file (all other headers should be the same).


Repository:
  rL LLVM

https://reviews.llvm.org/D32816





More information about the llvm-commits mailing list