[clang] [Hexagon] Disable system include paths (PR #185456)
Alexey Karyakin via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 10:19:38 PDT 2026
quic-akaryaki wrote:
> > Hexagon toolchains are almost always cross-compiling and using system include paths is vrtually always an error. In general, adding implicit paths is confusing and a comment in `InitHeaderSearch::AddDefaultIncludePaths()` suggests that "this code path is going away" and the proper place for path selection is in the driver. The current logic is to use system paths by default but it looks like almost all majors OSes are explictly excluded.
>
> _almost_ indeed. Some of us do make native toolchains though 😉
If you are talking about the Hexagon Linux native toolchain, it is not affected because Linux is explicitly excluded in the switch above.
> > Disable implicit system include paths for Hexagon targets.
>
> What practical problem are we trying to solve by making this change?
The practical problem is the difficulty of debugging header inclusion bugs when system and toolchain-provided headers can be mixed up.
> cc @SidManning
https://github.com/llvm/llvm-project/pull/185456
More information about the cfe-commits
mailing list