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

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 12:26:19 PDT 2017


phosek added a comment.

I realized that the current solution isn't going to work for compiler-rt since Clang driver expects the sanitizer libraries to end up in `/lib/clang/$version/lib/$sys/`. The issues is that compiler-rt already has it's own way of handling different targets, so we should use it rather than having to modify both the compiler-rt build and Clang driver. However, we need a solution for other libraries,: libunwind, libc++abi and libc++. One option would be to build compiler-rt runtimes separately, similarly to builtins build and then build the rest of libraries using the runtimes/CMakeLists.txt file (what this change does) and use the `CMAKE_INSTALL_PREFIX` to specify the installation target. Alternative would be to add a new variable to libunwind's, libc++abi's and libc++'s CMakeLists.txt that will allow overriding the installation path; compiler-rt already uses such variable: `COMPILER_RT_INSTALL_PATH` so we could probably use `<RUNTIME>_INSTALL_PATH`. Do you have any preference or opinion about any of these solutions?


Repository:
  rL LLVM

https://reviews.llvm.org/D32816





More information about the llvm-commits mailing list