[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

GitOrigin-RevId: ea12d779bc238c387511fe7462020f4ecf4a8246
diff --git a/test/libcxxabi/test/config.py b/test/libcxxabi/test/config.py
index f8f9927..1c4d5be 100644
--- a/test/libcxxabi/test/config.py
+++ b/test/libcxxabi/test/config.py
@@ -69,6 +69,12 @@
         if not os.path.isdir(cxx_headers):
             self.lit_config.fatal("cxx_headers='%s' is not a directory."
                                   % cxx_headers)
+        (path, version) = os.path.split(cxx_headers)
+        (path, cxx) = os.path.split(path)
+        cxx_target_headers = os.path.join(
+            path, self.get_lit_conf('target_triple', None), cxx, version)
+        if os.path.isdir(cxx_target_headers):
+            self.cxx.compile_flags += ['-I' + cxx_target_headers]
         self.cxx.compile_flags += ['-I' + cxx_headers]
 
         libcxxabi_headers = self.get_lit_conf(