Skip to content

switching to MCJIT #3922

@vtjnash

Description

@vtjnash

Eventually, we may need/want to switch to MCJIT for various reasons. This patch is all that appears to be needed (on Linux):

diff --git a/src/codegen.cpp b/src/codegen.cpp
index 5204cfd..42864c3 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -3409,6 +3409,7 @@ extern "C" void jl_init_codegen(void)
 #endif
     jl_ExecutionEngine = EngineBuilder(jl_Module)
         .setEngineKind(EngineKind::JIT)
+        .setUseMCJIT(true)
         .setTargetOptions(options)
         .create();
 #endif // LLVM VERSION

Unfortunately, it doesn't seem to run on Apple yet?

$ ./julia 
LLVM ERROR: Target does not support MC emission!
$ uname
Darwin

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamThe issue is with an upstream dependency, e.g. LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions