[PATCH] D105429: [JITLink][RISCV] Initial Support RISCV64 in JITLink

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 18:07:49 PDT 2021


lhames added inline comments.


================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp:266
+                            const object::ELFFile<ELFT> &Obj)
+      : ELFLinkGraphBuilder<ELFT>(Obj, Triple("riscv64-unknown-linux"),
+                                  FileName, getELFRISCVRelocationKindName) {}
----------------
StephenFan wrote:
> jrtc27 wrote:
> > This still hard-codes Linux, as well as that it's 64-bit now the class is just ELFLinkGraphBuilder_riscv.
> To avoid hard-codes, I add an argument to initialize the triple information.  Is there any better way to avoid hard-codes ? @jrtc27 
Passing an argument in here seems like a reasonable solution to me. You can probably use the triple returned by `ObjectFile::makeTriple` when you construct the graph builder in createLinkGraphFromELFObject_riscv below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105429/new/

https://reviews.llvm.org/D105429



More information about the llvm-commits mailing list