diff --git a/src/jit/compilation.rs b/src/jit/compilation.rs index 5aeecc2..5f0347e 100644 --- a/src/jit/compilation.rs +++ b/src/jit/compilation.rs @@ -1,8 +1,6 @@ use std::sync::Arc; -use macroassembler::{ - assembler::disassembler::try_to_disassemble, wtf::executable_memory_handle::CodeRef, -}; +use macroassembler::wtf::executable_memory_handle::CodeRef; use crate::data_section::DataSection; @@ -44,8 +42,9 @@ impl Compilation { // SAFETY: // `code_ref` is fully initialized // + #[cfg(feature = "disassembly")] unsafe { - try_to_disassemble( + macroassembler::assembler::disassembler::try_to_disassemble( self.code_ref.start(), self.code_ref.size_in_bytes(), " ", @@ -54,6 +53,11 @@ impl Compilation { .unwrap(); } + #[cfg(not(feature = "disassembly"))] + { + out.push_str("please enable the disassembly feature to show code disassembly"); + } + out } }