<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/96870>96870</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            why clang++ use standard header from gcc? 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xiedeacc
      </td>
    </tr>
</table>

<pre>
    I notice llvm source tree have c++ standard header files, why install doesn't install it and use it, in fact, I found clang++ use gcc standard headers, why?

os: ubuntu22.04
/usr/local/llvm-18/bin/clang++ -E -x c++ - -v < /dev/null
```
clang version 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-18/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/12
Candidate multilib: .;@m64
Selected multilib: .;@m64
 (in-process)
 "/usr/local/llvm-18/bin/clang-18" -cc1 -triple x86_64-unknown-linux-gnu -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/root/src/library/bazel_demo_3.7.2 -v -fcoverage-compilation-dir=/root/src/library/bazel_demo_3.7.2 -resource-dir /usr/local/llvm-18/lib/clang/18 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++ -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/x86_64-linux-gnu -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/backward -internal-isystem /usr/local/llvm-18/lib/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -ferror-limit 19 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -x c++ -
clang -cc1 version 18.1.8 based upon LLVM 18.1.8 default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/backward"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++
 /usr/local/llvm-18/lib/clang/18/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEV01v2zwS_jX0ZTCCRPnz4ENiR90A7WW76B4NihzJ3FCkQFKOs79-QdlO0qRJm91tXyBwpOFwnuF8POKIEHRridZsds1m24kY4t759VGTIiHlpHbqYX0L1kUtCYw5dBDc4CVB9ESwFwcCyfg149cQorBKeAV7Eoo8NNpQYHwD9_sH0DZEYQwoR8EyvoiPEh1BWAVDINAxqWsLjZDj4y00brAKpBG2PcMkxVbKl3AXJFZWLN-y_Or06wIrr2CoBxsHzrN8el7k1RA845VxUpj03xw6LJaMV7W2jFfPEfEG8Ph4TAQ8ACs3wHil6MB4ZQdjzmbn-flvfB2NwIF80M5CscyKbAmML_cx9skvxivGq1bH_VBn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