Previously the driver would only report multilibs which already exist. This has been relaxed so that when there is no detected GCC installation the multilibs will be reported anyway.
In the absence of a GCC installation, the driver will look for libraries starting from the resource directory:
This is slightly different to the path in the case where a GCC install is detected. in that case the resource directory includes the triple:
In addition to the resource directory the driver will also look for libraries not installed alongside the compiler in the following directories:
In the absence of a detected GCC installation:
With a GCC installation:
The calculation of the sysroot has also been updated. If a sysroot was not provided to the driver then the driver would try to derive it from the detected GCC installation. If this was not possible then it would be derived from the directory of the driver "<prefix>/bin/clang" as follows:
This uses the original triple as provided to the compiler, however this isn't ideal as the presence of multilibs means that riscv32 libraries/headers/tools may be installed under "<prefix>/riscv64-unknown-elf" instead of "<prefix>/riscv32-unknown-elf". The GCC installation detector already handles this by trying both the original triple *and* the triple of the biarch variant using the first directory with exists. This behaviour has been copied so the same occurs even without a gcc installation.