[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl
Rich Felker via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 4 19:18:15 PDT 2019
dalias added a comment.
Just chiming in to confirm that the requested change is correct for musl. musl does not support use/mixing of compiler-provided std headers with its headers, and intentionally has no mechanism for communicating with such headers as to which types have already been defined or still need to be defined. If the current include order, with clang's headers before the libc ones, works in some situations, it's only by accident.
My understanding is that most if not all of the BSDs also work this way; GCC has their libc header dirs ordered before the GCC include dir. So it probably makes sense to do the same change for them.
CHANGES SINCE LAST ACTION
More information about the cfe-commits