Skip to content

Commit fca8300

Browse files
vchuravyvtjnash
authored andcommitted
Enable OpaquePointers on LLVM 15
1 parent 3cc4fdc commit fca8300

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

src/codegen.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9362,17 +9362,6 @@ extern "C" void jl_init_llvm(void)
93629362
if (clopt && clopt->getNumOccurrences() == 0)
93639363
cl::ProvidePositionalOption(clopt, "4", 1);
93649364

9365-
#if JL_LLVM_VERSION >= 150000
9366-
clopt = llvmopts.lookup("opaque-pointers");
9367-
if (clopt && clopt->getNumOccurrences() == 0) {
9368-
#ifdef JL_LLVM_OPAQUE_POINTERS
9369-
cl::ProvidePositionalOption(clopt, "true", 1);
9370-
#else
9371-
cl::ProvidePositionalOption(clopt, "false", 1);
9372-
#endif
9373-
}
9374-
#endif
9375-
93769365
jl_ExecutionEngine = new JuliaOJIT();
93779366

93789367
bool jl_using_gdb_jitevents = false;

src/jitlayers.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,10 @@ JuliaOJIT::JuliaOJIT()
16291629
DLSymOpt(std::make_unique<DLSymOptimizer>(false)),
16301630
ContextPool([](){
16311631
auto ctx = std::make_unique<LLVMContext>();
1632+
#ifndef JL_LLVM_OPAQUE_POINTERS
1633+
if (ctx.supportsTypedPointers())
1634+
ctx.setOpaquePointers(false);
1635+
#endif
16321636
return orc::ThreadSafeContext(std::move(ctx));
16331637
}),
16341638
#ifdef JL_USE_JITLINK

src/llvm-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#error Only LLVM versions >= 14.0.0 are supported by Julia
1515
#endif
1616

17-
#if JL_LLVM_VERSION >= 160000
17+
#if JL_LLVM_VERSION >= 150000
1818
#define JL_LLVM_OPAQUE_POINTERS 1
1919
#endif
2020

0 commit comments

Comments
 (0)