Change how flags are stored in serialized modules.
This commit changes how both the shared flags and ISA flags are stored in the serialized module to detect incompatibilities when a serialized module is instantiated. It improves the error reporting when a compiled module has mismatched shared flags.
This commit is contained in:
@@ -63,7 +63,7 @@ use crate::result::CodegenResult;
|
||||
use crate::settings;
|
||||
use crate::settings::SetResult;
|
||||
use crate::timing;
|
||||
use alloc::{borrow::Cow, boxed::Box, string::String, vec::Vec};
|
||||
use alloc::{borrow::Cow, boxed::Box, vec::Vec};
|
||||
use core::any::Any;
|
||||
use core::fmt;
|
||||
use core::fmt::{Debug, Formatter};
|
||||
@@ -274,11 +274,8 @@ pub trait TargetIsa: fmt::Display + Send + Sync {
|
||||
/// Get the ISA-independent flags that were used to make this trait object.
|
||||
fn flags(&self) -> &settings::Flags;
|
||||
|
||||
/// Get the enabled ISA-dependent flags that were used to make this trait object.
|
||||
fn enabled_isa_flags(&self) -> Vec<String>;
|
||||
|
||||
/// Determines if the given ISA-dependent flag is enabled.
|
||||
fn is_flag_enabled(&self, flag: &str) -> bool;
|
||||
/// Get the ISA-dependent flag values that were used to make this trait object.
|
||||
fn isa_flags(&self) -> Vec<settings::Value>;
|
||||
|
||||
/// Hashes all flags, both ISA-independent and ISA-dependent, into the specified hasher.
|
||||
fn hash_all_flags(&self, hasher: &mut dyn Hasher);
|
||||
|
||||
Reference in New Issue
Block a user