mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
enable dev backend repl on macos (x86_64 and aarch64)
This commit is contained in:
parent
fee4e94eb0
commit
7bcff253be
1 changed files with 22 additions and 4 deletions
|
@ -54,12 +54,18 @@ pub fn eval_llvm(
|
||||||
|
|
||||||
let interns = loaded.interns.clone();
|
let interns = loaded.interns.clone();
|
||||||
|
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(all(
|
||||||
|
any(target_os = "linux", target_os = "macos"),
|
||||||
|
any(target_arch = "x86_64", target_arch = "aarch64")
|
||||||
|
)))]
|
||||||
let (lib, main_fn_name, subs, layout_interner) =
|
let (lib, main_fn_name, subs, layout_interner) =
|
||||||
mono_module_to_dylib_llvm(&arena, target, loaded, opt_level)
|
mono_module_to_dylib_llvm(&arena, target, loaded, opt_level)
|
||||||
.expect("we produce a valid Dylib");
|
.expect("we produce a valid Dylib");
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(all(
|
||||||
|
any(target_os = "linux", target_os = "macos"),
|
||||||
|
any(target_arch = "x86_64", target_arch = "aarch64")
|
||||||
|
))]
|
||||||
let (lib, main_fn_name, subs, layout_interner) =
|
let (lib, main_fn_name, subs, layout_interner) =
|
||||||
mono_module_to_dylib_asm(&arena, target, loaded, opt_level)
|
mono_module_to_dylib_asm(&arena, target, loaded, opt_level)
|
||||||
.expect("we produce a valid Dylib");
|
.expect("we produce a valid Dylib");
|
||||||
|
@ -166,7 +172,13 @@ impl ReplAppMemory for CliMemory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(target_os = "linux", allow(unused))]
|
#[cfg_attr(
|
||||||
|
all(
|
||||||
|
any(target_os = "linux", target_os = "macos"),
|
||||||
|
any(target_arch = "x86_64", target_arch = "aarch64")
|
||||||
|
),
|
||||||
|
allow(unused)
|
||||||
|
)]
|
||||||
fn mono_module_to_dylib_llvm<'a>(
|
fn mono_module_to_dylib_llvm<'a>(
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
target: &Triple,
|
target: &Triple,
|
||||||
|
@ -269,7 +281,13 @@ fn mono_module_to_dylib_llvm<'a>(
|
||||||
.map(|lib| (lib, main_fn_name, subs, layout_interner))
|
.map(|lib| (lib, main_fn_name, subs, layout_interner))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(target_os = "linux"), allow(unused))]
|
#[cfg_attr(
|
||||||
|
not(all(
|
||||||
|
any(target_os = "linux", target_os = "macos"),
|
||||||
|
any(target_arch = "x86_64", target_arch = "aarch64")
|
||||||
|
)),
|
||||||
|
allow(unused)
|
||||||
|
)]
|
||||||
fn mono_module_to_dylib_asm<'a>(
|
fn mono_module_to_dylib_asm<'a>(
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
target: &Triple,
|
target: &Triple,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue