Skip to content

Commit 50ae2f2

Browse files
committed
Switch RISC-V to large code model on LLVM 20
Given llvm/llvm-project#70308 is in LLVM 20, I guess we can switch to it barring any bugs.
1 parent 6a32f7a commit 50ae2f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/jitlayers.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,9 +1328,11 @@ namespace {
13281328
if (TheTriple.isAArch64())
13291329
codemodel = CodeModel::Small;
13301330
else if (TheTriple.isRISCV()) {
1331-
// RISC-V will support large code model in LLVM 21
1332-
// https://github.com/llvm/llvm-project/pull/70308
1331+
#if JL_LLVM_VERSION >= 200000
1332+
codemodel = CodeModel::Large;
1333+
#else
13331334
codemodel = CodeModel::Medium;
1335+
#endif
13341336
}
13351337
// Generate simpler code for JIT
13361338
Reloc::Model relocmodel = Reloc::Static;

0 commit comments

Comments
 (0)