[clang] [clang][Driver] Fix libc++ include path on NetBSD (PR #212716)
Rainer Orth via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 30 04:58:36 PDT 2026
rorth wrote:
I've done some research on the background of the `/usr/include/c++` directory:
- It can be installed from `external/bsd/libc++/include/Makefile` in the NetBSD `src` tree.
- The installation is controlled by the `MKLIBCXX` build option, which is `yes` if `MKLLVM` is set and the architecture in question needs it (x86_64 and i386 do).
- However, `MKLLVM` is only set by the toplevel `build.sh` script with the `-c` option. As [documented in](https://www.netbsd.org/docs/guide/en/chap-build.html), that's off by default.
- Even so, the `__config_site` file that would be installed is is fixed on in `external/bsd/libc++/include`, matching `libcxxrt` which is most likely useless for current `libcxx`
Therefore I suppose that this patch, like #212725, can just do away with searching `/usr/include/c++`, remove `NetBSD::addLibCxxIncludePaths`, and fall back to the `Generic_GCC` version.
https://github.com/llvm/llvm-project/pull/212716
More information about the cfe-commits
mailing list