[llvm-branch-commits] [clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)
Petr Hosek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 25 23:19:53 PDT 2025
================
@@ -534,8 +554,14 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-Bstatic");
- if (TC.getTriple().isRISCV() && Args.hasArg(options::OPT_mno_relax))
- CmdArgs.push_back("--no-relax");
+ if (Triple.isRISCV()) {
+ if (Args.hasArg(options::OPT_mno_relax))
+ CmdArgs.push_back("--no-relax");
+ CmdArgs.push_back("-m");
+ CmdArgs.push_back(Arch == llvm::Triple::riscv64 ? "elf64lriscv"
+ : "elf32lriscv");
+ CmdArgs.push_back("-X");
+ }
----------------
petrhosek wrote:
This would ideally be a separate PR which could land before the final removal of `RISCVToolchain`.
https://github.com/llvm/llvm-project/pull/121831
More information about the llvm-branch-commits
mailing list