Skip to content

Commit f1db62a

Browse files
Zentrikgiordano
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 a483d90 commit f1db62a

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
@@ -1350,9 +1350,11 @@ namespace {
13501350
if (TheTriple.isAArch64())
13511351
codemodel = CodeModel::Small;
13521352
else if (TheTriple.isRISCV()) {
1353-
// RISC-V will support large code model in LLVM 21
1354-
// https://github.com/llvm/llvm-project/pull/70308
1353+
#if JL_LLVM_VERSION >= 200000
1354+
codemodel = CodeModel::Large;
1355+
#else
13551356
codemodel = CodeModel::Medium;
1357+
#endif
13561358
}
13571359
// Generate simpler code for JIT
13581360
Reloc::Model relocmodel = Reloc::Static;

0 commit comments

Comments
 (0)