Skip to content

Commit a158053

Browse files
committed
msvc dist extended: rust-analyzer is optional
The windows tarballs and installers expect rust-analyzer to be present, but it's not always the case. For example, in try builds.
1 parent 8a4a6f7 commit a158053

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

src/bootstrap/dist.rs

+20-19
Original file line numberDiff line numberDiff line change
@@ -1601,8 +1601,7 @@ impl Step for Extended {
16011601
prepare("cargo");
16021602
prepare("rust-analysis");
16031603
prepare("rust-std");
1604-
prepare("rust-analyzer");
1605-
for tool in &["clippy", "rust-docs", "rust-demangler", "miri"] {
1604+
for tool in &["clippy", "rust-analyzer", "rust-docs", "rust-demangler", "miri"] {
16061605
if built_tools.contains(tool) {
16071606
prepare(tool);
16081607
}
@@ -1688,23 +1687,25 @@ impl Step for Extended {
16881687
.arg("-out")
16891688
.arg(exe.join("StdGroup.wxs")),
16901689
);
1691-
builder.run(
1692-
Command::new(&heat)
1693-
.current_dir(&exe)
1694-
.arg("dir")
1695-
.arg("rust-analyzer")
1696-
.args(&heat_flags)
1697-
.arg("-cg")
1698-
.arg("RustAnalyzerGroup")
1699-
.arg("-dr")
1700-
.arg("RustAnalyzer")
1701-
.arg("-var")
1702-
.arg("var.RustAnalyzerDir")
1703-
.arg("-out")
1704-
.arg(exe.join("RustAnalyzerGroup.wxs"))
1705-
.arg("-t")
1706-
.arg(etc.join("msi/remove-duplicates.xsl")),
1707-
);
1690+
if built_tools.contains("rust-analyzer") {
1691+
builder.run(
1692+
Command::new(&heat)
1693+
.current_dir(&exe)
1694+
.arg("dir")
1695+
.arg("rust-analyzer")
1696+
.args(&heat_flags)
1697+
.arg("-cg")
1698+
.arg("RustAnalyzerGroup")
1699+
.arg("-dr")
1700+
.arg("RustAnalyzer")
1701+
.arg("-var")
1702+
.arg("var.RustAnalyzerDir")
1703+
.arg("-out")
1704+
.arg(exe.join("RustAnalyzerGroup.wxs"))
1705+
.arg("-t")
1706+
.arg(etc.join("msi/remove-duplicates.xsl")),
1707+
);
1708+
}
17081709
if built_tools.contains("clippy") {
17091710
builder.run(
17101711
Command::new(&heat)

0 commit comments

Comments
 (0)