diff --git a/build.rs b/build.rs index ad28533..02c39f8 100644 --- a/build.rs +++ b/build.rs @@ -9,7 +9,8 @@ use rustc_version::{version_meta, Channel}; fn main() { // Set cfg flags depending on release channel if let Channel::Nightly = version_meta().unwrap().channel { - return println!("cargo:rustc-cfg=nightly"); + // return println!("cargo:rustc-cfg=nightly"); + println!("cargo:rustc-cfg=nightly"); } // for the stable build asm lib diff --git a/src/detail/x86_64_unix.rs b/src/detail/x86_64_unix.rs index 47b5060..ec28c6f 100644 --- a/src/detail/x86_64_unix.rs +++ b/src/detail/x86_64_unix.rs @@ -2,7 +2,7 @@ use crate::detail::{align_down, mut_offset}; use crate::reg_context::InitFn; use crate::stack::Stack; -#[cfg(not(nightly))] +// #[cfg(not(nightly))] #[link(name = "asm", kind = "static")] extern "C" { pub fn bootstrap_green_task(); @@ -10,6 +10,7 @@ extern "C" { pub fn swap_registers(out_regs: *mut Registers, in_regs: *const Registers); } +/* #[cfg(nightly)] mod asm_impl { use super::Registers; @@ -88,6 +89,7 @@ mod asm_impl { } #[cfg(nightly)] pub use self::asm_impl::*; +*/ #[repr(C)] #[derive(Debug)] diff --git a/src/detail/x86_64_windows.rs b/src/detail/x86_64_windows.rs index 1a27855..021ecc1 100644 --- a/src/detail/x86_64_windows.rs +++ b/src/detail/x86_64_windows.rs @@ -2,7 +2,7 @@ use crate::detail::{align_down, mut_offset}; use crate::reg_context::InitFn; use crate::stack::Stack; -#[cfg(not(nightly))] +// #[cfg(not(nightly))] #[link(name = "asm", kind = "static")] extern "C" { pub fn bootstrap_green_task(); @@ -16,6 +16,7 @@ pub fn prefetch(data: *const usize) { unsafe { prefetch_asm(data) } } +/* #[cfg(nightly)] mod asm_impl { use super::Registers; @@ -162,9 +163,10 @@ mod asm_impl { } #[cfg(nightly)] pub use self::asm_impl::*; +*/ -#[cfg_attr(nightly, repr(simd))] -#[cfg_attr(not(nightly), repr(C))] +// #[cfg_attr(nightly, repr(simd))] +#[repr(C)] #[allow(non_camel_case_types)] #[derive(Debug, Copy, Clone, Eq, PartialEq)] struct XMM(u32, u32, u32, u32); diff --git a/src/lib.rs b/src/lib.rs index 475f835..fd296ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,10 +3,7 @@ //! Rust generator library //! -#![cfg_attr(nightly, feature(llvm_asm))] -#![cfg_attr(nightly, feature(repr_simd))] #![cfg_attr(nightly, feature(core_intrinsics))] -#![cfg_attr(nightly, feature(naked_functions))] #![cfg_attr(nightly, feature(thread_local))] #![cfg_attr(test, deny(warnings))] #![deny(missing_docs)]