mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
make sure that the jit is linked in when running the repl
This commit is contained in:
parent
ba99b96164
commit
31e963fad6
2 changed files with 5 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
use bumpalo::Bump;
|
use bumpalo::Bump;
|
||||||
use inkwell::context::Context;
|
use inkwell::context::Context;
|
||||||
|
use inkwell::execution_engine::ExecutionEngine;
|
||||||
use inkwell::OptimizationLevel;
|
use inkwell::OptimizationLevel;
|
||||||
use roc_builtins::unique::uniq_stdlib;
|
use roc_builtins::unique::uniq_stdlib;
|
||||||
use roc_can::constraint::Constraint;
|
use roc_can::constraint::Constraint;
|
||||||
|
@ -287,6 +288,10 @@ fn gen(src: &[u8], target: Triple, opt_level: OptLevel) -> Result<ReplOutput, Fa
|
||||||
.create_jit_execution_engine(OptimizationLevel::None)
|
.create_jit_execution_engine(OptimizationLevel::None)
|
||||||
.expect("Error creating JIT execution engine for test");
|
.expect("Error creating JIT execution engine for test");
|
||||||
|
|
||||||
|
// Without calling this, we get a linker error when building this crate
|
||||||
|
// in --release mode and then trying to eval anything in the repl.
|
||||||
|
ExecutionEngine::link_in_mc_jit();
|
||||||
|
|
||||||
// Compile and add all the Procs before adding main
|
// Compile and add all the Procs before adding main
|
||||||
let env = roc_gen::llvm::build::Env {
|
let env = roc_gen::llvm::build::Env {
|
||||||
arena: &arena,
|
arena: &arena,
|
||||||
|
|
|
@ -871,12 +871,6 @@ fn ext_var_is_empty_tag_union(_: &Subs, _: Variable) -> bool {
|
||||||
unreachable!();
|
unreachable!();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(debug_assertions))]
|
|
||||||
fn ext_var_is_empty_record(_: &Subs, _: Variable) -> bool {
|
|
||||||
// This should only ever be used in debug_assert! macros
|
|
||||||
unreachable!();
|
|
||||||
}
|
|
||||||
|
|
||||||
fn layout_from_num_content<'a>(content: Content) -> Result<Layout<'a>, LayoutProblem> {
|
fn layout_from_num_content<'a>(content: Content) -> Result<Layout<'a>, LayoutProblem> {
|
||||||
use roc_types::subs::Content::*;
|
use roc_types::subs::Content::*;
|
||||||
use roc_types::subs::FlatType::*;
|
use roc_types::subs::FlatType::*;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue