about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-30 15:57:57 +0000
committerbors <bors@rust-lang.org>2020-08-30 15:57:57 +0000
commit85fbf49ce0e2274d0acf798f6e703747674feec3 (patch)
tree158a05eb3f204a8e72939b58427d0c2787a4eade /src/bootstrap
parentdb534b3ac286cf45688c3bbae6aa6e77439e52d2 (diff)
parent9e5f7d5631b8f4009ac1c693e585d4b7108d4275 (diff)
Auto merge of #74862 - mark-i-m:mv-compiler, r=petrochenkov
Move almost all compiler crates to compiler/

This PR implements https://github.com/rust-lang/compiler-team/issues/336 and moves all `rustc_*` crates from `src` to the new `compiler` directory.

`librustc_foo` directories are renamed to `rustc_foo`.
`src` directories are introduced inside `rustc_*` directories to mirror the scheme already use for `library` crates.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/README.md2
-rw-r--r--src/bootstrap/builder/tests.rs2
-rw-r--r--src/bootstrap/compile.rs4
-rw-r--r--src/bootstrap/dist.rs2
-rw-r--r--src/bootstrap/doc.rs1
-rw-r--r--src/bootstrap/flags.rs2
-rw-r--r--src/bootstrap/test.rs2
7 files changed, 8 insertions, 7 deletions
diff --git a/src/bootstrap/README.md b/src/bootstrap/README.md
index 86de3d5c6d8..975b8be02c8 100644
--- a/src/bootstrap/README.md
+++ b/src/bootstrap/README.md
@@ -274,7 +274,7 @@ directory, but rather the compiler is split into three different Cargo projects:
 
 * `library/std` - the standard library
 * `library/test` - testing support, depends on libstd
-* `src/rustc` - the actual compiler itself
+* `compiler/rustc` - the actual compiler itself
 
 Each "project" has a corresponding Cargo.lock file with all dependencies, and
 this means that building the compiler involves running Cargo three times. The
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs
index 5b6c327896b..c395e1da6dd 100644
--- a/src/bootstrap/builder/tests.rs
+++ b/src/bootstrap/builder/tests.rs
@@ -371,7 +371,7 @@ mod dist {
         let mut builder = Builder::new(&build);
         builder.run_step_descriptions(
             &Builder::get_step_descriptions(Kind::Build),
-            &["src/rustc".into(), "library/std".into()],
+            &["compiler/rustc".into(), "library/std".into()],
         );
 
         let a = TargetSelection::from_user("A");
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 373e240cb8e..bf06b61d1d7 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -449,7 +449,7 @@ impl Step for Rustc {
     const DEFAULT: bool = false;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
-        run.path("src/rustc")
+        run.path("compiler/rustc")
     }
 
     fn make_run(run: RunConfig<'_>) {
@@ -524,7 +524,7 @@ pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelec
         .arg("--features")
         .arg(builder.rustc_features())
         .arg("--manifest-path")
-        .arg(builder.src.join("src/rustc/Cargo.toml"));
+        .arg(builder.src.join("compiler/rustc/Cargo.toml"));
     rustc_cargo_env(builder, cargo, target);
 }
 
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index d021feafbe4..c1022099a02 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -1097,7 +1097,7 @@ impl Step for PlainSourceTarball {
             "Cargo.toml",
             "Cargo.lock",
         ];
-        let src_dirs = ["src", "library"];
+        let src_dirs = ["src", "compiler", "library"];
 
         copy_src_dirs(builder, &builder.src, &src_dirs, &[], &plain_dst_src);
 
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 2a8f43950db..d7f3a888edd 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -694,6 +694,7 @@ impl Step for UnstableBookGen {
         builder.remove_dir(&out);
         let mut cmd = builder.tool_cmd(Tool::UnstableBookGen);
         cmd.arg(builder.src.join("library"));
+        cmd.arg(builder.src.join("compiler"));
         cmd.arg(builder.src.join("src"));
         cmd.arg(out);
 
diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs
index 38b3a32e3b5..2db4bb07a9f 100644
--- a/src/bootstrap/flags.rs
+++ b/src/bootstrap/flags.rs
@@ -385,7 +385,7 @@ Arguments:
         ./x.py test src/test/ui --bless
         ./x.py test src/test/ui --compare-mode nll
 
-    Note that `test src/test/* --stage N` does NOT depend on `build src/rustc --stage N`;
+    Note that `test src/test/* --stage N` does NOT depend on `build compiler/rustc --stage N`;
     just like `build library/std --stage N` it tests the compiler produced by the previous
     stage.
 
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index ac833a55d4c..a7c9b99f45f 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -734,7 +734,7 @@ impl Step for Tidy {
     /// for the `dev` or `nightly` channels.
     fn run(self, builder: &Builder<'_>) {
         let mut cmd = builder.tool_cmd(Tool::Tidy);
-        cmd.arg(builder.src.join("src"));
+        cmd.arg(&builder.src);
         cmd.arg(&builder.initial_cargo);
         if builder.is_verbose() {
             cmd.arg("--verbose");