about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-05-04 19:18:17 +0200
committerGitHub <noreply@github.com>2023-05-04 19:18:17 +0200
commit0098cd4e83574a9e8771b2ac643d85e5e07e44a9 (patch)
tree1ddf66a75bb076d254e3bf210c44a47c0c9b5a18 /src
parenteac35583d2ffb5ed9e564dee0822c9a244058ee0 (diff)
parentfd4c81f4c19e3b1eb0710e50e04fb1f980b7e7ab (diff)
downloadrust-0098cd4e83574a9e8771b2ac643d85e5e07e44a9.tar.gz
rust-0098cd4e83574a9e8771b2ac643d85e5e07e44a9.zip
Rollup merge of #108865 - Zoxc:library-dummy-crate, r=jyn514
Add a `sysroot` crate to represent the standard library crates

This adds a dummy crate named `sysroot` to represent the standard library target instead of using the `test` crate. This allows the removal of `proc_macro` as a dependency of `test` allowing these 2 crates to build in parallel saving around 9 seconds locally.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/check.rs2
-rw-r--r--src/bootstrap/clean.rs2
-rw-r--r--src/bootstrap/compile.rs4
-rw-r--r--src/bootstrap/doc.rs2
-rw-r--r--src/bootstrap/test.rs2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 60de46ce64c..956b82385f6 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -79,7 +79,7 @@ impl Step for Std {
     const DEFAULT: bool = true;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.all_krates("test").path("library")
+        run.all_krates("sysroot").path("library")
     }
 
     fn make_run(run: RunConfig<'_>) {
diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs
index 7ebd0a8f270..0d9fd56b038 100644
--- a/src/bootstrap/clean.rs
+++ b/src/bootstrap/clean.rs
@@ -81,7 +81,7 @@ macro_rules! clean_crate_tree {
 
 clean_crate_tree! {
     Rustc, Mode::Rustc, "rustc-main";
-    Std, Mode::Std, "test";
+    Std, Mode::Std, "sysroot";
 }
 
 fn clean_default(build: &Build, all: bool) {
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 7d2a6862500..966ae00fa1d 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -56,7 +56,7 @@ impl Step for Std {
         // When downloading stage1, the standard library has already been copied to the sysroot, so
         // there's no need to rebuild it.
         let builder = run.builder;
-        run.crate_or_deps("test")
+        run.crate_or_deps("sysroot")
             .path("library")
             .lazy_default_condition(Box::new(|| !builder.download_rustc()))
     }
@@ -364,7 +364,7 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
             .arg("--features")
             .arg(features)
             .arg("--manifest-path")
-            .arg(builder.src.join("library/test/Cargo.toml"));
+            .arg(builder.src.join("library/sysroot/Cargo.toml"));
 
         // Help the libc crate compile by assisting it in finding various
         // sysroot native libraries.
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 9ad98eb5702..8f5d9bb66e1 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -438,7 +438,7 @@ impl Step for Std {
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
         let builder = run.builder;
-        run.all_krates("test").path("library").default_condition(builder.config.docs)
+        run.all_krates("sysroot").path("library").default_condition(builder.config.docs)
     }
 
     fn make_run(run: RunConfig<'_>) {
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index aee84e9c9be..cfccb516627 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -2145,7 +2145,7 @@ impl Step for Crate {
     const DEFAULT: bool = true;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.crate_or_deps("test")
+        run.crate_or_deps("sysroot")
     }
 
     fn make_run(run: RunConfig<'_>) {