clike compilers: Add default sysroot include directory
When building against a sysroot, meson currently fails to detect that the /usr/include directory within that sysroot is a default search directory. This causes the directory to be added with -isystem to the compiler command-line which in turn causes include lookup failures.
A minimal test case to reproduce this behaviour is:
$ echo -e "#include
Omitting the -isystem /usr/include option avoids that error because it doesn't mess up the include directory search order.
Fix this by adding the sysroot's /usr/include directory to the list of default search directories when a sysroot is detected. This ensures that any occurrences of it are filtered out and the include directory search order is left alone.
@dcbaker any comments on this?
@dcbaker I'm still running into this issue with sysrooted cross builds, can you take a look at this?
Also, I'm sorry I missed this before. I haven't been doing a good job of keeping my github notifications manageable :/