don't try to run dbg with roc run

This commit is contained in:
Folkert 2022-11-24 11:19:41 +01:00
parent adddc1ff70
commit 5cb47939e2
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 13 additions and 11 deletions

View file

@ -158,7 +158,7 @@ impl LlvmBackendMode {
}
}
fn runs_expects(self) -> bool {
pub(crate) fn runs_expects(self) -> bool {
match self {
LlvmBackendMode::Binary => false,
LlvmBackendMode::BinaryDev => true,

View file

@ -1123,18 +1123,20 @@ pub(crate) fn run_low_level<'a, 'ctx, 'env>(
// now what
arguments!(condition);
let region = unsafe { std::mem::transmute::<_, roc_region::all::Region>(args[0]) };
if env.mode.runs_expects() {
let region = unsafe { std::mem::transmute::<_, roc_region::all::Region>(args[0]) };
crate::llvm::expect::clone_to_shared_memory(
env,
scope,
layout_ids,
args[0],
region,
&[args[0]],
);
crate::llvm::expect::clone_to_shared_memory(
env,
scope,
layout_ids,
args[0],
region,
&[args[0]],
);
crate::llvm::expect::send_dbg(env);
crate::llvm::expect::send_dbg(env);
}
condition
}