mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 02:31:20 -06:00
RISC-V became a default backend in Clang 9.0. This commit enables the use of the RISC-V backend for Clang in versions: - 9.0.0 - 10.0.0 - 10.0.1 - 11.0.0 I also did a few other tidy-ups: - I ensured that these could use more headers for rv64, by adding the `--gcc-toolchain` and `--sysroot` args to point to the rv64 8.2.0 cross-compiled gcc toolchain. - I updated the `-mabi` for rv64gc so it matches what that toolchain is likely to have chosen as a default (and what a user is likely to expect with the gc extension). I should check this, but I'm not sure how I can. - I updated the `-mabi` for rv32gc so it matches what a user is likely to choose by default (ilp32d). - I changed the config keys to introduce a hyphen, to match the arm compiler keys (and added the right alias). - I'm not sure if older versions of CE-built clang also have RISC-V, given that the clang-builder repo has `RISCV` in the experimental targets to build. (PR incoming to remove that, as it's no longer needed). I haven't been able to test this, partially because it depends on the exact compiler-explorer setup on amazon, but I gleaned these details from code in the compiler-explorer/infra repository. Signed-off-by: Sam Elliott <sam@lenary.co.uk>