androm3da wrote: > > > > clang headers such as `<limits.h>`, `<stddef.h>`, etc use > > > > `#include_next` so they should be included _before_ sysroot-provided > > > > headers. The x86 clang toolchain does this in the same order. > > > > > > > > > so IIUC this means that clang's stddef.h will check if there is another > > > stddef.h (maybe provided by libc), if yes, it will include that one > > > instead of clang's stddef? if this is the case, then this patch should be > > > fine > > > > I'm not sure why linux-musl uses a reverse order, which I kept, but > > > > maybe we can remove this @androm3da ? CORRECTION: hexagon-linux-musl > > > > uses reverse order with user-provided sysroot only, with internal > > > > sysroot the order is usual (resource dir -> sysroot). And hexagon_*.h > > > > headers are already installed in the resource dir (luckly). > > > > > > > > > I don't see why the include order should be different for user-provided > > > vs internal sysroot, probably should be fixed > > > > > > Just speculating but I think the precedence (descending) should probably be > > (1) resource dir (2) user sysroot, if specified (3) internal sysroot. > > You mean that both sysroots should be in the path? Do you have a usecase in > mind when it's needed? I would worry that mixing files from different > sysroots may cause problems. I would speculate that `--sysroot` should > replace a sysroot, not amend it.
You're right, if the sysroot is specified via `--sysroot` then it should take the place of the `DEFAULT_SYSROOT`. Both should not be provided. https://github.com/llvm/llvm-project/pull/186494 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
