diff --git a/src/runner/dispatch.rs b/src/runner/dispatch.rs index 91fafdcd..68ea012b 100644 --- a/src/runner/dispatch.rs +++ b/src/runner/dispatch.rs @@ -71,8 +71,7 @@ pub(crate) fn execute_file_with_backend(runner: &NyashRunner, filename: &str) { if runner.config.compile_native { #[cfg(feature = "cranelift-jit")] { - use super::super::modes::aot; - aot::execute_aot_mode(runner, filename); + runner.execute_aot_mode(filename); return; } #[cfg(not(feature = "cranelift-jit"))] diff --git a/src/runner/modes/mod.rs b/src/runner/modes/mod.rs index afc3ad35..612fd5f4 100644 --- a/src/runner/modes/mod.rs +++ b/src/runner/modes/mod.rs @@ -3,3 +3,6 @@ pub mod mir; pub mod vm; pub mod llvm; pub mod bench; + +#[cfg(feature = "cranelift-jit")] +pub mod aot;