Try fixing compilation on Windows.

This commit is contained in:
losfair 2019-11-22 00:36:34 +08:00
parent d1352554e3
commit 15e3a038ea
2 changed files with 5 additions and 1 deletions

View File

@ -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>,
}

View File

@ -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::*;