Merge branch 'master' into feature/update-api

This commit is contained in:
Mark McCaskey
2020-03-30 17:40:18 -07:00
committed by GitHub
51 changed files with 2928 additions and 1623 deletions

View File

@ -106,7 +106,7 @@ impl BackendCompilerConfig {
}
/// Configuration data for the compiler
#[derive(Debug, Default)]
#[derive(Debug)]
pub struct CompilerConfig {
/// Symbol information generated from emscripten; used for more detailed debug messages
pub symbol_map: Option<HashMap<u32, String>>,
@ -136,6 +136,13 @@ pub struct CompilerConfig {
/// Enabling this makes execution deterministic but increases runtime overhead.
pub nan_canonicalization: bool,
/// Turns on verification that is done by default when `debug_assertions` are enabled
/// (for example in 'debug' builds). Disabling this flag will make compilation faster
/// in debug mode at the cost of not detecting bugs in the compiler.
///
/// These verifications are disabled by default in 'release' builds.
pub enable_verification: bool,
pub features: Features,
// Target info. Presently only supported by LLVM.
@ -148,6 +155,30 @@ pub struct CompilerConfig {
pub generate_debug_info: bool,
}
impl Default for CompilerConfig {
fn default() -> Self {
Self {
symbol_map: Default::default(),
memory_bound_check_mode: Default::default(),
enforce_stack_check: Default::default(),
track_state: Default::default(),
full_preemption: Default::default(),
nan_canonicalization: Default::default(),
features: Default::default(),
triple: Default::default(),
cpu_name: Default::default(),
cpu_features: Default::default(),
backend_specific_config: Default::default(),
generate_debug_info: Default::default(),
// Default verification to 'on' when testing or running in debug mode.
// NOTE: cfg(test) probably does nothing when not running `cargo test`
// on this crate
enable_verification: cfg!(test) || cfg!(debug_assertions),
}
}
}
impl CompilerConfig {
/// Use this to check if we should be generating debug information.
/// This function takes into account the features that runtime-core was

View File

@ -743,7 +743,10 @@ pub unsafe fn get_fault_info(siginfo: *const c_void, ucontext: *mut c_void) -> F
}
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
#[cfg(all(
any(target_os = "linux", target_os = "android"),
target_arch = "aarch64"
))]
/// Get fault info from siginfo and ucontext.
pub unsafe fn get_fault_info(siginfo: *const c_void, ucontext: *mut c_void) -> FaultInfo {
#[allow(dead_code)]
@ -810,7 +813,10 @@ pub unsafe fn get_fault_info(siginfo: *const c_void, ucontext: *mut c_void) -> F
}
}
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
#[cfg(all(
any(target_os = "linux", target_os = "android"),
target_arch = "x86_64"
))]
/// Get fault info from siginfo and ucontext.
pub unsafe fn get_fault_info(siginfo: *const c_void, ucontext: *mut c_void) -> FaultInfo {
use libc::{