Skip to content

Commit dfdb4a6

Browse files
Zentrikmaleadt
authored andcommitted
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 095e753 commit dfdb4a6

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
@@ -1386,9 +1386,11 @@ namespace {
13861386
if (TheTriple.isAArch64())
13871387
codemodel = CodeModel::Small;
13881388
else if (TheTriple.isRISCV()) {
1389-
// RISC-V will support large code model in LLVM 21
1390-
// https://github.com/llvm/llvm-project/pull/70308
1389+
#if JL_LLVM_VERSION >= 200000
1390+
codemodel = CodeModel::Large;
1391+
#else
13911392
codemodel = CodeModel::Medium;
1393+
#endif
13921394
}
13931395
// Generate simpler code for JIT
13941396
Reloc::Model relocmodel = Reloc::Static;

0 commit comments

Comments
 (0)