[clang] [clang] Enable --gcc-install-dir for RISCV baremetal toolchains (PR #71803)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 11 14:49:38 PST 2023


MaskRay wrote:

Thanks for the pointer. However, the description doesn't appear to have sufficient information to justify the `--gcc-toolchain=` dependent decision. A toolchain should be selected completely from the target triple. I think `RISCVToolChain` should be adjusted to either select a different target triple, or (I am sorry to say this) be removed, since some choices (`crt0.o` `-lgloss`) are strange.

> So in the toolchain selection code, I have made this dependency of RISCVToolChain on gcc toolchain explicit. It is created if gcc-toolchain option is present. Otherwise Baremetal toolchain is created. I will be happy to hear if there is a better way to choose between these two toolchains.

@abidh 

https://github.com/llvm/llvm-project/pull/71803


More information about the cfe-commits mailing list