[llvm] 4403ece - [ORC] Do not set CodeModel::Small in LLJITBuilder if JTMB already has a value
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 00:16:53 PDT 2024
Author: epitavy
Date: 2024-06-28T17:16:49+10:00
New Revision: 4403ece3c5ddccddab365624a1be7cf595a0e52f
URL: https://github.com/llvm/llvm-project/commit/4403ece3c5ddccddab365624a1be7cf595a0e52f
DIFF: https://github.com/llvm/llvm-project/commit/4403ece3c5ddccddab365624a1be7cf595a0e52f.diff
LOG: [ORC] Do not set CodeModel::Small in LLJITBuilder if JTMB already has a value
(#88115) (#90599)
Closes #88115
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
index aa2bf52cdfd27..c053ef51411ce 100644
--- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -801,8 +801,9 @@ Error LLJITBuilderState::prepareForConstruction() {
break;
}
if (UseJITLink) {
+ if (!JTMB->getCodeModel())
+ JTMB->setCodeModel(CodeModel::Small);
JTMB->setRelocationModel(Reloc::PIC_);
- JTMB->setCodeModel(CodeModel::Small);
CreateObjectLinkingLayer =
[](ExecutionSession &ES,
const Triple &) -> Expected<std::unique_ptr<ObjectLayer>> {
More information about the llvm-commits
mailing list