about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index f64161fb027..d16d7a52065 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -307,16 +307,30 @@ impl Crate {
 #[derive(Debug, Hash, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
 pub enum Mode {
     /// Build the standard library, placing output in the "stageN-std" directory.
-    Libstd,
+    Std,
 
     /// Build libtest, placing output in the "stageN-test" directory.
-    Libtest,
+    Test,
 
-    /// Build librustc and compiler libraries, placing output in the "stageN-rustc" directory.
-    Librustc,
+    /// Build librustc, and compiler libraries, placing output in the "stageN-rustc" directory.
+    Rustc,
 
-    /// Build some tool, placing output in the "stageN-tools" directory.
-    Tool,
+    /// Build codegen libraries, placing output in the "stageN-codegen" directory
+    Codegen,
+
+    /// Build some tools, placing output in the "stageN-tools" directory.
+    ToolStd,
+    ToolTest,
+    ToolRustc,
+}
+
+impl Mode {
+    pub fn is_tool(&self) -> bool {
+        match self {
+            Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => true,
+            _ => false
+        }
+    }
 }
 
 impl Build {
@@ -517,10 +531,11 @@ impl Build {
     /// The mode indicates what the root directory is for.
     fn stage_out(&self, compiler: Compiler, mode: Mode) -> PathBuf {
         let suffix = match mode {
-            Mode::Libstd => "-std",
-            Mode::Libtest => "-test",
-            Mode::Tool => "-tools",
-            Mode::Librustc => "-rustc",
+            Mode::Std => "-std",
+            Mode::Test => "-test",
+            Mode::Codegen => "-rustc",
+            Mode::Rustc => "-rustc",
+            Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "-tools",
         };
         self.out.join(&*compiler.host)
                 .join(format!("stage{}{}", compiler.stage, suffix))