[all-commits] [llvm/llvm-project] ea12d7: [libc++] Support per-target __config_site in per-t...

Petr Hosek via All-commits all-commits at lists.llvm.org
Wed Apr 28 14:27:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ea12d779bc238c387511fe7462020f4ecf4a8246
      https://github.com/llvm/llvm-project/commit/ea12d779bc238c387511fe7462020f4ecf4a8246
  Author: Petr Hosek <phosek at google.com>
  Date:   2021-04-28 (Wed, 28 Apr 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Fuchsia.cpp
    M clang/lib/Driver/ToolChains/Gnu.cpp
    A clang/test/Driver/Inputs/basic_fuchsia_tree/include/aarch64-unknown-fuchsia/c++/v1/.keep
    A clang/test/Driver/Inputs/basic_fuchsia_tree/include/riscv64-unknown-fuchsia/c++/v1/.keep
    A clang/test/Driver/Inputs/basic_fuchsia_tree/include/x86_64-unknown-fuchsia/c++/v1/.keep
    A clang/test/Driver/Inputs/basic_linux_libcxx_tree/usr/include/x86_64-unknown-linux-gnu/c++/v1/.keep
    A clang/test/Driver/Inputs/basic_linux_libcxxv2_tree/usr/include/x86_64-unknown-linux-gnu/c++/v2/.keep
    A clang/test/Driver/Inputs/basic_linux_libstdcxx_libcxxv2_tree/usr/include/x86_64-unknown-linux-gnu/c++/v2/.keep
    M clang/test/Driver/fuchsia.cpp
    M clang/test/Driver/linux-header-search.cpp
    M libcxx/CMakeLists.txt
    M libcxx/benchmarks/CMakeLists.txt
    M libcxx/include/CMakeLists.txt
    M libcxx/utils/libcxx/test/config.py
    M libcxxabi/test/libcxxabi/test/config.py

  Log Message:
  -----------
  [libc++] Support per-target __config_site in per-target runtime build

When using the per-target runtime build, it may be desirable to have
different __config_site headers for each target where all targets cannot
share a single configuration.

The layout used for libc++ headers after this change is:

```
include/
  c++/
    v1/
      <libc++ headers except for __config_site>
  <target1>/
    c++/
      v1/
        __config_site
  <target2>/
    c++/
      v1/
        __config_site
  <other targets>
```

This is the most optimal layout since it avoids duplication, the only
headers that's per-target is __config_site, all other headers are
shared across targets. This also means that we no need two
-isystem flags: one for the target-agnostic headers and one for
the target specific headers.

Differential Revision: https://reviews.llvm.org/D89013




More information about the All-commits mailing list