================
@@ -534,8 +534,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");
----------------
quic-garvgupt wrote:
Thanks for pointing this out. I have moved the function to CommonArgs.{h|cpp}
and called that function inside the BareMetal toolchain.
https://github.com/llvm/llvm-project/pull/134442
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits