forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Minimize the sysroot crates in play * Don't use build scripts to inject args * Use `RUSTC_WRAPPER` to dynamically switch `--sysroot` depending on whether we're building sysroot crates or not. * Minimize dependency graph in sysroot, only have each crate depend on a dummy crates.io crate for testing and otherwise don't depend on anything to load the desired sysroot crate directly.
- Loading branch information
1 parent
1ed8760
commit dead4d0
Showing
17 changed files
with
199 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
[workspace] | ||
members = [ | ||
"src/liballoc", | ||
"src/libcore", | ||
"src/libproc_macro", | ||
"src/libstd", | ||
"src/libtest", | ||
] | ||
|
||
[patch.crates-io] | ||
rustc-std-workspace-std = { path = 'src/tools/rustc-std-workspace-std' } | ||
rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' } | ||
rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
pub fn custom_api() {} | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "dummy")] | ||
|
||
extern crate alloc; | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub use alloc::*; | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub fn custom_api() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,3 @@ edition = "2018" | |
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
core = { path = "../libcore" } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#![no_std] | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "dummy")] | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub use core::*; | ||
|
||
pub fn custom_api() {} | ||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub fn custom_api() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,3 @@ edition = "2018" | |
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
core = { path = "../libcore" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,3 @@ edition = "2018" | |
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
std = { path = "../libstd" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "dummy")] | ||
|
||
extern crate proc_macro; | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub use proc_macro::*; | ||
pub fn custom_api() {} | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub fn custom_api() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#![feature(staged_api)] | ||
#![stable(since = "1.0.0", feature = "dummy")] | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub use std::*; | ||
|
||
#[stable(since = "1.0.0", feature = "dummy")] | ||
pub fn custom_api() { | ||
registry_dep_using_core::custom_api(); | ||
registry_dep_using_alloc::custom_api(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#![feature(staged_api)] | ||
#![feature(test)] | ||
#![unstable(feature = "test", issue = "0")] | ||
|
||
extern crate test; | ||
|
||
pub use test::*; | ||
|
||
pub fn custom_api() { | ||
registry_dep_using_std::custom_api(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.