[libcxx-commits] [PATCH] D89013: [libcxx] Support per-target __config_site in per-target runtime build
Petr Hosek via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 31 15:22:39 PDT 2021
phosek added a comment.
In D89013#2662434 <https://reviews.llvm.org/D89013#2662434>, @ldionne wrote:
> I'm personally not so concerned with the Clang driver side of things, but primarily with adding more complexity to the libc++ build. Shouldn't we be driving things from the runtimes build and setting a different `CMAKE_INSTALL_PREFIX` to install stuff to the right location instead? Then you can run N builds of libc++ for N targets, each setting the appropriate install path.
We could do that but problem with the approach is that we would end up duplicating all headers across targets. Since all headers except `__config_site` should be the same, we only want to have per-target version of that header which is what this change is doing. The final directory layout you end up with:
include/
c++/
v1/
<headers except for __config_site>
x86_64-linux-gnu/
c++/
v1/
__config_site
<other targets>
This is the most optimal layout but I don't think it's something we can achieve purely with `CMAKE_INSTALL_PREFIX` without additional build support.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89013/new/
https://reviews.llvm.org/D89013
More information about the libcxx-commits
mailing list