Conditionally use nightly features

This allows us to build on other OSs
parent cceeae6f
Pipeline #5199 failed with stages
in 1 minute and 5 seconds
use std::env;
pub fn main() {
if let Ok(os) = env::var("CARGO_CFG_TARGET_OS") {
if os == "redox" {
println!("cargo:rustc-cfg=nightly");
}
}
}
#![feature(asm)]
#![feature(const_fn)]
#![cfg_attr(nightly, feature(asm))]
#![cfg_attr(nightly, feature(const_fn))]
#![cfg_attr(not(test), no_std)]
#[cfg(test)]
......@@ -10,6 +10,7 @@ pub use self::call::*;
pub use self::data::*;
pub use self::error::*;
pub use self::flag::*;
#[cfg(target_os = "redox")]
pub use self::io::*;
pub use self::number::*;
pub use self::scheme::*;
......@@ -47,6 +48,7 @@ pub mod error;
pub mod flag;
/// Functions for low level hardware control
#[cfg(target_os = "redox")]
pub mod io;
/// Call numbers used by each system call
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment