[libcxx-commits] [libcxx] 69c2087 - [libc++] Fix compiler-rt build by copying libc++ headers to <build>/include

Nico Weber via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 21 16:22:55 PDT 2020


The contract is enshrined in the clang driver. Requiring an install as part
of the build/run dev loop seems suboptimal maybe?

Anyhow, is there a reason the headers couldn't keep being copied to
builddir/include/... (where they used to be)? From my read of your change,
I think your patch is independent of the actual copy destination, so why
not just keep the old location? I.e. set LIBCXX_GENERATED_INCLUDE_DIR
to LIBCXX_HEADER_DIR/include/c++/v1 ?

On Wed, Oct 21, 2020 at 7:15 PM Louis Dionne <ldionne at apple.com> wrote:

>
>
> > On Oct 21, 2020, at 19:05, Nico Weber <thakis at chromium.org> wrote:
> >
> > Not sure I'd call this an "implementation detail". The build dir used to
> have clang in 'bin/clang', lib stuff in 'lib/...', and this in
> 'include/...'. That's also the dir layout when installing, and it means
> that clang's built-in search logic would find libc++ headers before. That
> seems like a bad thing to break?
>
>
> I wasn't aware this was a convention at a point -- I must have missed it,
> or it isn't something that's widely known.
>
> In all cases, I would argue that the proper way to create something that
> looks like an installation root is to actually perform the installation to
> a directory using the scripts that CMake gives you. You can even do it from
> within CMake itself. That way, you are guaranteed that the proper
> installation steps are performed, for example:
> - Setting up the config_site header properly
> - Replacing libc++.so by a linker script on platforms that do that
>
> So it looks like I broke something that is (or once was) a "contract",
> however I definitely think that contract should be more explicit. I'll see
> what I can do to improve the situation there.
>
> Louis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201021/571f22d6/attachment.html>


More information about the libcxx-commits mailing list