Skip to content
Snippets Groups Projects
Commit f7efe341 authored by Alex Crichton's avatar Alex Crichton
Browse files

Add support to build as part of the standard library

parent 14bf9ded
No related branches found
No related tags found
Loading
......@@ -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)]
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment