[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl
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. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65699/new/ https://reviews.llvm.org/D65699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl
dalias added a comment. It's not just infeasible; it's impossible by design. musl's headers do not support any contract with compiler-provided versions of the std headers, and won't. Attempting to use them in place of the libc ones is unsupported usage and will periodically break. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65699/new/ https://reviews.llvm.org/D65699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl
dalias added a comment. That's a separate issue of clang having a slight types-ABI mismatch with some 32-bit archs whose original ABIs used `long` instead of `int` for `wchar_t`. The wrong header order makes it quickly apparent, but these are independent; wrong header order is still wrong and will break (other) things even without this type mismatch. Backport of the fix would be much appreciated. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65699/new/ https://reviews.llvm.org/D65699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D159312: [Headers] Remove a space in NULL define
dalias added a comment. I don't understand the motivation of trying to match musl's definition here. musl explicitly **does not support** using a compiler-provided `stddef.h` or other standard headers. If it's getting included, this is a symption of an include order problem that needs to be fixed, and getting an error telling you that is preferable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159312/new/ https://reviews.llvm.org/D159312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D159312: [Headers] Remove a space in NULL define
dalias added a comment. Please report what you're actually trying to do that's breaking rather than sending patches to align definitions that are not intended to be aligned. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159312/new/ https://reviews.llvm.org/D159312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D159383: [Headers] Remove musl-related comment about NULL
dalias added a comment. musl targets **already** have the libc header path before the compiler header path in a BSD-like configuration (the BSDs also have this order on GCC and I would assume on clang as well), so if the compiler-provided `stddef.h` is getting seen at all, there's either a bug in clang's path logic or (more likely) user error, like trying to use musl with a non-musl target tuple, no "system headers" path, and simple `-I` to point at the musl headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159383/new/ https://reviews.llvm.org/D159383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D159383: [Headers] Remove musl-related comment about NULL
dalias added a comment. To be clear, musl does not support this regardless of whether `#include_next` is being used "right" or not. The only supported thing is not mixing headers at all. If Emscripten and wasi are using musl-based headers, it probably makes sense for these targets to do the same thing with include order as for musl targets. The practice of mixing responsibility for system headers between libc and the compiler is a very glibc+gcc specific legacy thing. Even on gcc, the BSD targets don't do this. Other targets might just because the gcc folks had a thing about "fixing" proprietary unices' headers, but the standard open source non-GNU thing to do is to leave the headers entirely as the libc's responsibility. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159383/new/ https://reviews.llvm.org/D159383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits