LibraryPaths is rather underused in Clang, unlike FilePaths. The latter
notably includes the sysroot for bare-metal toolchains, so this allows
compiler-rt to be found alongside the other libraries shipped as part of
a sysroot rather than requiring it to be bundled with Clang, allowing
bare-metal sysroots to behave much more like real OS sysroots.
This is particularly useful for RISC-V where there is an abundance of
possible ISA and ABI choices, but the architecture suffix added to the
library name only captures the architectural word size. Putting them in
ISA and ABI-specific sysroots is the easiest way to allow multiple
configurations to coexist on the system given that such sysroots already
must exist with the system headers and precompiled libc.
clang-tidy: warning: twine variables are prone to use-after-free bugs [llvm-twine-local]
not useful