[compiler-rt] [llvm] [JITLink][Mips] Add ELF backend (PR #224578)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 05:49:57 PDT 2026
================
@@ -1028,13 +1028,13 @@ class LinkGraph {
LinkGraph(std::string Name, std::shared_ptr<orc::SymbolStringPool> SSP,
Triple TT, SubtargetFeatures Features,
- GetEdgeKindNameFunction GetEdgeKindName)
+ GetEdgeKindNameFunction GetEdgeKindName,
+ std::optional<unsigned> PointerSize = std::nullopt)
: Name(std::move(Name)), SSP(std::move(SSP)), TT(std::move(TT)),
Features(std::move(Features)),
- GetEdgeKindName(std::move(GetEdgeKindName)) {
- assert(!(Triple::getArchPointerBitWidth(this->TT.getArch()) % 8) &&
----------------
lhames wrote:
My first reaction is that we'd be better off adding a defaulted `StringRef ABIName = ""` argument: if it's non-empty, we generate a data-layout string and pulling the pointer size out of that, and as a bonus we can report the LinkGraph's ABI, which might be helpful in other contexts. On the flip side we'd have to find a way to feed this through -- it's not part of the top-level JITLink APIs at the moment.
Just to check that I understand from the changes to `ELFLinkGraphBuilder.h`:
```c++
ELFT::Is64Bits ? 8 : 4
```
Are mips64 N32 objects ELF32? Are there mips64 objects that are ELF64? How would they be handled?
https://github.com/llvm/llvm-project/pull/224578
More information about the llvm-commits
mailing list