summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-09-12 02:32:43 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-09-24 10:32:45 -0400
commit9baa601afd50f57655be9eb7e5e2892c2ea9f005 (patch)
tree10e5b9026a6bd53af7f4d7860fd5843e6281a93d /src/bootstrap/lib.rs
parentcbc5e4d4d5715cfe111def11bbd1d8afae2ea80e (diff)
downloadrust-9baa601afd50f57655be9eb7e5e2892c2ea9f005.tar.gz
rust-9baa601afd50f57655be9eb7e5e2892c2ea9f005.zip
Add `x.py setup`
- Suggest `x.py setup` if config.toml doesn't exist yet (twice, once
before and once after the build)
- Prompt for a profile if not given on the command line
- Print the configuration file that will be used
- Print helpful starting commands after setup
- Link to the dev-guide after finishing
- Note that distro maintainers will see the changelog warning
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 3f7aeae0ed4..4cc72f5f39c 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -141,6 +141,7 @@ mod metadata;
 mod native;
 mod run;
 mod sanity;
+mod setup;
 mod test;
 mod tool;
 mod toolstate;
@@ -165,7 +166,7 @@ mod job {
 
 use crate::cache::{Interned, INTERNER};
 pub use crate::config::Config;
-use crate::flags::Subcommand;
+pub use crate::flags::Subcommand;
 
 const LLVM_TOOLS: &[&str] = &[
     "llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility
@@ -470,6 +471,10 @@ impl Build {
             return clean::clean(self, all);
         }
 
+        if let Subcommand::Setup { path: include_name } = &self.config.cmd {
+            return setup::setup(&self.config.src, include_name);
+        }
+
         {
             let builder = builder::Builder::new(&self);
             if let Some(path) = builder.paths.get(0) {