[llvm] ba6a59c - [JITLink] Set correct triple instead of hard-code the value to linux (#175404)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 11 21:13:18 PST 2026
Author: aokblast
Date: 2026-01-12T16:13:13+11:00
New Revision: ba6a59c8750c61287a70a4562fd54a16d086b695
URL: https://github.com/llvm/llvm-project/commit/ba6a59c8750c61287a70a4562fd54a16d086b695
DIFF: https://github.com/llvm/llvm-project/commit/ba6a59c8750c61287a70a4562fd54a16d086b695.diff
LOG: [JITLink] Set correct triple instead of hard-code the value to linux (#175404)
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
index 2c8790273f8b2..48fda4c31e158 100644
--- a/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
@@ -239,9 +239,10 @@ class ELFLinkGraphBuilder_x86_64 : public ELFLinkGraphBuilder<object::ELF64LE> {
public:
ELFLinkGraphBuilder_x86_64(StringRef FileName,
std::shared_ptr<orc::SymbolStringPool> SSP,
+ llvm::Triple Triple,
const object::ELFFile<object::ELF64LE> &Obj,
SubtargetFeatures Features)
- : ELFLinkGraphBuilder(Obj, std::move(SSP), Triple("x86_64-unknown-linux"),
+ : ELFLinkGraphBuilder(Obj, std::move(SSP), std::move(Triple),
std::move(Features), FileName,
x86_64::getEdgeKindName) {}
};
@@ -350,9 +351,9 @@ Expected<std::unique_ptr<LinkGraph>> createLinkGraphFromELFObject_x86_64(
return Features.takeError();
auto &ELFObjFile = cast<object::ELFObjectFile<object::ELF64LE>>(**ELFObj);
- return ELFLinkGraphBuilder_x86_64((*ELFObj)->getFileName(), std::move(SSP),
- ELFObjFile.getELFFile(),
- std::move(*Features))
+ return ELFLinkGraphBuilder_x86_64(
+ (*ELFObj)->getFileName(), std::move(SSP), (*ELFObj)->makeTriple(),
+ ELFObjFile.getELFFile(), std::move(*Features))
.buildGraph();
}
More information about the llvm-commits
mailing list