Don't generate DWARF sections when no functions were compiled. (#894)
This commit is contained in:
@@ -48,10 +48,22 @@ pub type ValueLabelsRanges = PrimaryMap<DefinedFuncIndex, cranelift_codegen::Val
|
||||
/// Stack slots for functions.
|
||||
pub type StackSlots = PrimaryMap<DefinedFuncIndex, ir::StackSlots>;
|
||||
|
||||
/// Memory definition offset in the VMContext structure.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ModuleMemoryOffset {
|
||||
/// Not available.
|
||||
None,
|
||||
/// Offset to the defined memory.
|
||||
Defined(u32),
|
||||
/// Offset to the imported memory.
|
||||
Imported(u32),
|
||||
}
|
||||
|
||||
/// Module `vmctx` related info.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ModuleVmctxInfo {
|
||||
/// The memory definition offset in the VMContext structure.
|
||||
pub memory_offset: i64,
|
||||
pub memory_offset: ModuleMemoryOffset,
|
||||
|
||||
/// The functions stack slots.
|
||||
pub stack_slots: StackSlots,
|
||||
|
||||
@@ -40,7 +40,8 @@ pub mod cranelift;
|
||||
pub mod lightbeam;
|
||||
|
||||
pub use crate::address_map::{
|
||||
FunctionAddressMap, InstructionAddressMap, ModuleAddressMap, ModuleVmctxInfo, ValueLabelsRanges,
|
||||
FunctionAddressMap, InstructionAddressMap, ModuleAddressMap, ModuleMemoryOffset,
|
||||
ModuleVmctxInfo, ValueLabelsRanges,
|
||||
};
|
||||
pub use crate::cache::{create_new_config as cache_create_new_config, init as cache_init};
|
||||
pub use crate::compilation::{
|
||||
|
||||
Reference in New Issue
Block a user