about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-21 19:24:02 +0000
committerbors <bors@rust-lang.org>2016-02-21 19:24:02 +0000
commitf93a62b68def853ee86dec4e27fbc4068c25dd32 (patch)
tree73353fafc4c299a0846dda3672dbddd090464a3e /src
parent0f62d219fbc02fc39f2fc4222d58ffb875c4900f (diff)
parent8ade08041294446fd44978a9a068cb3b30ca4001 (diff)
downloadrust-f93a62b68def853ee86dec4e27fbc4068c25dd32.tar.gz
rust-f93a62b68def853ee86dec4e27fbc4068c25dd32.zip
Auto merge of #31792 - Zoxc:sysroot, r=alexcrichton
With these changes you can build a freestanding sysroot without using floating points using a Cargo.toml and copying the `deps` folder cargo outputs.
```
[package]
name = "sysroot"
version = "0.1.0"

[lib]
path = "lib.rs"
crate-type = ["rlib"]

[dependencies.core]
path = "../vendor/rust/src/src/libcore"
features = ["disable_float"]

[dependencies]
collections = { path = "../vendor/rust/src/src/libcollections" }
```
Diffstat (limited to 'src')
-rw-r--r--src/liballoc/Cargo.toml2
-rw-r--r--src/liballoc/lib.rs7
-rw-r--r--src/libstd/lib.rs7
3 files changed, 7 insertions, 9 deletions
diff --git a/src/liballoc/Cargo.toml b/src/liballoc/Cargo.toml
index 5af8d9e8e27..5da0f1a10b9 100644
--- a/src/liballoc/Cargo.toml
+++ b/src/liballoc/Cargo.toml
@@ -10,5 +10,3 @@ test = false
 
 [dependencies]
 core = { path = "../libcore" }
-libc = { path = "../rustc/libc_shim" }
-alloc_system = { path = "../liballoc_system" }
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 1438103d7f6..1d928a922c7 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -92,16 +92,9 @@
 #![feature(unsafe_no_drop_flag, filling_drop)]
 #![feature(unsize)]
 
-// Issue# 30592: Systematically use alloc_system during stage0 since jemalloc
-// might be unavailable or disabled
-#![cfg_attr(stage0, feature(alloc_system))]
-
 #![cfg_attr(not(test), feature(raw, fn_traits, placement_new_protocol))]
 #![cfg_attr(test, feature(test, rustc_private, box_heap))]
 
-#[cfg(stage0)]
-extern crate alloc_system;
-
 // Allow testing this library
 
 #[cfg(test)]
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 416c01b539f..d8ecddcbe42 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -269,6 +269,10 @@
 #![feature(vec_push_all)]
 #![feature(zero_one)]
 
+// Issue# 30592: Systematically use alloc_system during stage0 since jemalloc
+// might be unavailable or disabled
+#![cfg_attr(stage0, feature(alloc_system))]
+
 // Don't link to std. We are std.
 #![no_std]
 
@@ -295,6 +299,9 @@ extern crate alloc;
 extern crate rustc_unicode;
 extern crate libc;
 
+#[cfg(stage0)]
+extern crate alloc_system;
+
 // Make std testable by not duplicating lang items and other globals. See #2912
 #[cfg(test)] extern crate std as realstd;