diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-07-09 10:15:30 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-07-09 10:15:30 +0200 |
| commit | 7a8e085835a54af9604ddb5eab5c75d547576ea2 (patch) | |
| tree | 2dc4aa06ca092ed8efa534151d4ce2fe89d2b90f /src/bootstrap | |
| parent | 68620b14a29d0db5f3b857ed1bd7348092a15b14 (diff) | |
| download | rust-7a8e085835a54af9604ddb5eab5c75d547576ea2.tar.gz rust-7a8e085835a54af9604ddb5eab5c75d547576ea2.zip | |
Also distribute cargo clippy
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/dist.rs | 7 | ||||
| -rw-r--r-- | src/bootstrap/tool.rs | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 0587dc8896d..33fa5f58c64 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1221,7 +1221,7 @@ impl Step for Clippy { let tmp = tmpdir(builder); let image = tmp.join("clippy-image"); drop(fs::remove_dir_all(&image)); - t!(fs::create_dir_all(&image)); + builder.create_dir(&image); // Prepare the image directory // We expect clippy to build, because we've exited this step above if tool @@ -1230,8 +1230,13 @@ impl Step for Clippy { compiler: builder.compiler(stage, builder.config.build), target, extra_features: Vec::new() }).or_else(|| { println!("Unable to build clippy, skipping dist"); None })?; + let cargoclippy = builder.ensure(tool::CargoClippy { + compiler: builder.compiler(stage, builder.config.build), + target, extra_features: Vec::new() + }).or_else(|| { println!("Unable to build cargo clippy, skipping dist"); None })?; builder.install(&clippy, &image.join("bin"), 0o755); + builder.install(&cargoclippy, &image.join("bin"), 0o755); let doc = image.join("share/doc/clippy"); builder.install(&src.join("README.md"), &doc, 0o644); builder.install(&src.join("LICENSE"), &doc, 0o644); diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index a22f5fd2252..2571054cc2c 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -584,6 +584,14 @@ macro_rules! tool_extended { tool_extended!((self, builder), Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {}; + CargoClippy, clippy, "src/tools/clippy", "cargo-clippy", { + // Clippy depends on procedural macros (serde), which requires a full host + // compiler to be available, so we need to depend on that. + builder.ensure(compile::Rustc { + compiler: self.compiler, + target: builder.config.build, + }); + }; Clippy, clippy, "src/tools/clippy", "clippy-driver", { // Clippy depends on procedural macros (serde), which requires a full host // compiler to be available, so we need to depend on that. |
