[libcxx-commits] [PATCH] D108836: [libc++] Support -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on in CI

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 30 11:02:19 PDT 2021


MaskRay added a comment.

In D108836#2972688 <https://reviews.llvm.org/D108836#2972688>, @ldionne wrote:

> I'm somewhat concerned that we need to include two directories to properly handle libc++ here. I would prefer if we only needed to add `build/generic-cxx17/include/x86_64-unknown-linux-gnu/c++/v1`, i.e. the target-specific directory. Adding two directories is a change from how we've always done things in libc++. @phosek Was it intended that folks wouldn't be able to use libc++ without providing two include paths going forward?
>
> Apart from that concern, the patch LGTM. Marking as "request changes" until we've resolved that.

I am not the designer, but I think two trees make sense to me.

Most headers are generic and usable by all targets and are under `include/c++/v1`.

FWIW this hierarchy also resembles libstdc++, though it places `x86_64-glibc-linux-gnu` in the last path component:

  #include <...> search starts here:
   /tmp/glibc-many/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/10.2.1/../../../../x86_64-glibc-linux-gnu/include/c++/10.2.1
   /tmp/glibc-many/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/10.2.1/../../../../x86_64-glibc-linux-gnu/include/c++/10.2.1/x86_64-glibc-linux-gnu
   /tmp/glibc-many/install/compilers/x86_64-linux-gnu/lib/gcc/x86_64-glibc-linux-gnu/10.2.1/../../../../x86_64-glibc-linux-gnu/include/c++/10.2.1/backward

`__config_site` is target dependent and therefore under `include/x86_64-unknown-linux-gnu/c++/v1`.

Say we want to support -m32 in the same build (multiarch), we can use: `include/i386-unknown-linux-gnu/c++/v1`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108836/new/

https://reviews.llvm.org/D108836



More information about the libcxx-commits mailing list