Merge pull request #28 from alexcrichton/stdbuild

Add support to build as part of the standard library
This commit is contained in:
Alex Crichton 2015-11-02 16:20:05 -08:00
commit 7a83039ee9
2 changed files with 17 additions and 4 deletions

View File

@ -2,10 +2,10 @@ pub use self::imp::*;
#[cfg(not(dox))]
mod imp {
pub use std::option::Option;
pub use std::clone::Clone;
pub use std::marker::Copy;
pub use std::mem;
pub use core::option::Option;
pub use core::clone::Clone;
pub use core::marker::Copy;
pub use core::mem;
}
#[cfg(dox)]

View File

@ -11,6 +11,8 @@
//! Crate docs
#![allow(bad_style, raw_pointer_derive, overflowing_literals, improper_ctypes)]
#![crate_type = "rlib"]
#![crate_name = "libc"]
#![cfg_attr(dox, feature(no_core, lang_items))]
#![cfg_attr(dox, no_core)]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@ -56,6 +58,17 @@
html_root_url = "https://doc.rust-lang.org/libc/arm-linux-androideabi"
))]
// Attributes needed when building as part of the standard library
#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api))]
#![cfg_attr(stdbuild, no_std)]
#![cfg_attr(stdbuild, staged_api)]
#![cfg_attr(stdbuild, unstable(feature = "libc",
reason = "use `libc` from crates.io",
issue = "27783"))]
#[cfg(all(not(stdbuild), not(dox)))]
extern crate std as core;
#[macro_use] mod macros;
mod dox;