This is a prototype of a new approach to multilib.
The multilib.yaml file is a new interface that allows customising (a) which system library variants are available; and (b) how a library variant is identified as compatible with the clang arguments provided by the user.
The file clang/test/Driver/Inputs/baremetal_multilib/arm-none-eabi/multilib.yaml is an example that contains comments explaining how it is used.
The project I'm working on is LLVM Embedded Toolchain for Arm so the design is made with that in mind, but it's intended to be flexible enough to work with other toolchains with many system library variants.
RFC thread is here: https://discourse.llvm.org/t/rfc-multilib/67494