[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 17:05:55 PST 2024
================
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
const llvm::Triple::ArchType Arch = TC.getArch();
const llvm::Triple &Triple = getToolChain().getEffectiveTriple();
- AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA);
+ if (!D.SysRoot.empty())
+ CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
+ Args.addAllArgs(CmdArgs, {options::OPT_u});
CmdArgs.push_back("-Bstatic");
- if (TC.getTriple().isRISCV() && Args.hasArg(options::OPT_mno_relax))
- CmdArgs.push_back("--no-relax");
+ if (TC.getTriple().isRISCV()) {
----------------
topperc wrote:
Is `TC.getTriple()` different than the variable called `Triple`?
https://github.com/llvm/llvm-project/pull/118809
More information about the cfe-commits
mailing list