From 15e3a038ea55a694c3f06cf37b1b92f3131d5e4c Mon Sep 17 00:00:00 2001 From: losfair Date: Fri, 22 Nov 2019 00:36:34 +0800 Subject: [PATCH] Try fixing compilation on Windows. --- lib/runtime-core/src/codegen.rs | 4 +++- lib/runtime-core/src/state.rs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/runtime-core/src/codegen.rs b/lib/runtime-core/src/codegen.rs index 7e8aedd48..8cf1b6040 100644 --- a/lib/runtime-core/src/codegen.rs +++ b/lib/runtime-core/src/codegen.rs @@ -1,11 +1,12 @@ //! The codegen module provides common functions and data structures used by multiple backends //! during the code generation process. +#[cfg(unix)] +use crate::fault::FaultInfo; use crate::{ backend::RunnableModule, backend::{Backend, CacheGen, Compiler, CompilerConfig, Features, Token}, cache::{Artifact, Error as CacheError}, error::{CompileError, CompileResult}, - fault::FaultInfo, module::{ModuleInfo, ModuleInner}, structures::Map, types::{FuncIndex, FuncSig, SigIndex}, @@ -67,6 +68,7 @@ impl fmt::Debug for InternalEvent { /// Information for a breakpoint pub struct BreakpointInfo<'a> { /// Fault. + #[cfg(unix)] pub fault: Option<&'a FaultInfo>, } diff --git a/lib/runtime-core/src/state.rs b/lib/runtime-core/src/state.rs index e3ab9ca0f..1b7d3f34b 100644 --- a/lib/runtime-core/src/state.rs +++ b/lib/runtime-core/src/state.rs @@ -477,6 +477,7 @@ impl InstanceImage { } /// Declarations for x86-64 registers. +#[cfg(unix)] pub mod x64_decl { use super::*; @@ -608,6 +609,7 @@ pub mod x64_decl { } } +#[cfg(unix)] pub mod x64 { //! The x64 state module contains functions to generate state and code for x64 targets. pub use super::x64_decl::*;