Skip to content

Commit

Permalink
msvc dist extended: rust-analyzer is optional
Browse files Browse the repository at this point in the history
The windows tarballs and installers expect rust-analyzer to be present, but
it's not always the case. For example, in try builds.
  • Loading branch information
lqd committed Jul 1, 2023
1 parent 8a4a6f7 commit a158053
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1601,8 +1601,7 @@ impl Step for Extended {
prepare("cargo");
prepare("rust-analysis");
prepare("rust-std");
prepare("rust-analyzer");
for tool in &["clippy", "rust-docs", "rust-demangler", "miri"] {
for tool in &["clippy", "rust-analyzer", "rust-docs", "rust-demangler", "miri"] {
if built_tools.contains(tool) {
prepare(tool);
}
Expand Down Expand Up @@ -1688,23 +1687,25 @@ impl Step for Extended {
.arg("-out")
.arg(exe.join("StdGroup.wxs")),
);
builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("rust-analyzer")
.args(&heat_flags)
.arg("-cg")
.arg("RustAnalyzerGroup")
.arg("-dr")
.arg("RustAnalyzer")
.arg("-var")
.arg("var.RustAnalyzerDir")
.arg("-out")
.arg(exe.join("RustAnalyzerGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);
if built_tools.contains("rust-analyzer") {
builder.run(
Command::new(&heat)
.current_dir(&exe)
.arg("dir")
.arg("rust-analyzer")
.args(&heat_flags)
.arg("-cg")
.arg("RustAnalyzerGroup")
.arg("-dr")
.arg("RustAnalyzer")
.arg("-var")
.arg("var.RustAnalyzerDir")
.arg("-out")
.arg(exe.join("RustAnalyzerGroup.wxs"))
.arg("-t")
.arg(etc.join("msi/remove-duplicates.xsl")),
);
}
if built_tools.contains("clippy") {
builder.run(
Command::new(&heat)
Expand Down

0 comments on commit a158053

Please sign in to comment.