I recently discovered that we have two RISC-V toolchain classes in Clang that are intended to support baremetal development:
- RISCVToolChain is used when an existing GCC installation is present.
- BareMetal is used otherwise.
I think this creates an unnecessary maintenance overhead and increases confusion as evidenced by [clang] Enable --gcc-install-dir for RISCV baremetal toolchains by mihailo-stojanovic · Pull Request #71803 · llvm/llvm-project · GitHub. I don’t think that support for using an existing GCC installation is RISC-V specific and would be also beneficial to other targets supported by the BareMetal toolchain.
I would like to propose extending the BareMetal toolchain to support using an existing GCC installation, and then deprecating and removing the RISCVToolChain.