Skip to content

Commit 8f91a45

Browse files
committed
rustbuild: dist cargo-fmt as part of rustfmt
Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent 8cd5735 commit 8f91a45

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/bootstrap/dist.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,12 @@ impl Step for Rustfmt {
11631163
compiler: builder.compiler(stage, build.build),
11641164
target
11651165
}).expect("Rustfmt to build: toolstate is testing");
1166+
let cargofmt = builder.ensure(tool::Cargofmt {
1167+
compiler: builder.compiler(stage, build.build),
1168+
target
1169+
}).expect("Rustfmt to build: toolstate is testing");
11661170
install(&rustfmt, &image.join("bin"), 0o755);
1171+
install(&cargofmt, &image.join("bin"), 0o755);
11671172
let doc = image.join("share/doc/rustfmt");
11681173
install(&src.join("README.md"), &doc, 0o644);
11691174
install(&src.join("LICENSE-MIT"), &doc, 0o644);

src/bootstrap/tool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ macro_rules! tool_extended {
451451
}
452452

453453
tool_extended!((self, builder),
454+
Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {};
454455
Clippy, clippy, "src/tools/clippy", "clippy-driver", {
455456
// Clippy depends on procedural macros (serde), which requires a full host
456457
// compiler to be available, so we need to depend on that.

0 commit comments

Comments
 (0)