summaryrefslogtreecommitdiffstats
path: root/src/bootstrap/dist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/dist.rs')
-rw-r--r--src/bootstrap/dist.rs101
1 files changed, 56 insertions, 45 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 9cead7adc..b34a4b2dc 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -106,11 +106,7 @@ impl Step for JsonDocs {
/// Builds the `rust-docs-json` installer component.
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
let host = self.host;
- builder.ensure(crate::doc::Std {
- stage: builder.top_stage,
- target: host,
- format: DocumentationFormat::JSON,
- });
+ builder.ensure(crate::doc::Std::new(builder.top_stage, host, DocumentationFormat::JSON));
let dest = "share/doc/rust/json";
@@ -174,6 +170,10 @@ fn make_win_dist(
target: TargetSelection,
builder: &Builder<'_>,
) {
+ if builder.config.dry_run() {
+ return;
+ }
+
//Ask gcc where it keeps its stuff
let mut cmd = Command::new(builder.cc(target));
cmd.arg("-print-search-dirs");
@@ -1013,6 +1013,9 @@ impl Step for PlainSourceTarball {
.arg(builder.src.join("./compiler/rustc_codegen_cranelift/Cargo.toml"))
.arg("--sync")
.arg(builder.src.join("./src/bootstrap/Cargo.toml"))
+ // Will read the libstd Cargo.toml
+ // which uses the unstable `public-dependency` feature.
+ .env("RUSTC_BOOTSTRAP", "1")
.current_dir(&plain_dst_src);
let config = if !builder.config.dry_run() {
@@ -1594,9 +1597,7 @@ impl Step for Extended {
prepare("cargo");
prepare("rust-analysis");
prepare("rust-std");
- prepare("clippy");
- prepare("rust-analyzer");
- for tool in &["rust-docs", "rust-demangler", "miri"] {
+ for tool in &["clippy", "rust-analyzer", "rust-docs", "rust-demangler", "miri"] {
if built_tools.contains(tool) {
prepare(tool);
}
@@ -1682,40 +1683,44 @@ 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")),
- );
- builder.run(
- Command::new(&heat)
- .current_dir(&exe)
- .arg("dir")
- .arg("clippy")
- .args(&heat_flags)
- .arg("-cg")
- .arg("ClippyGroup")
- .arg("-dr")
- .arg("Clippy")
- .arg("-var")
- .arg("var.ClippyDir")
- .arg("-out")
- .arg(exe.join("ClippyGroup.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)
+ .current_dir(&exe)
+ .arg("dir")
+ .arg("clippy")
+ .args(&heat_flags)
+ .arg("-cg")
+ .arg("ClippyGroup")
+ .arg("-dr")
+ .arg("Clippy")
+ .arg("-var")
+ .arg("var.ClippyDir")
+ .arg("-out")
+ .arg(exe.join("ClippyGroup.wxs"))
+ .arg("-t")
+ .arg(etc.join("msi/remove-duplicates.xsl")),
+ );
+ }
if built_tools.contains("rust-demangler") {
builder.run(
Command::new(&heat)
@@ -1799,7 +1804,6 @@ impl Step for Extended {
.arg("-dCargoDir=cargo")
.arg("-dStdDir=rust-std")
.arg("-dAnalysisDir=rust-analysis")
- .arg("-dClippyDir=clippy")
.arg("-arch")
.arg(&arch)
.arg("-out")
@@ -1807,6 +1811,9 @@ impl Step for Extended {
.arg(&input);
add_env(builder, &mut cmd, target);
+ if built_tools.contains("clippy") {
+ cmd.arg("-dClippyDir=clippy");
+ }
if built_tools.contains("rust-docs") {
cmd.arg("-dDocsDir=rust-docs");
}
@@ -1833,7 +1840,9 @@ impl Step for Extended {
}
candle("CargoGroup.wxs".as_ref());
candle("StdGroup.wxs".as_ref());
- candle("ClippyGroup.wxs".as_ref());
+ if built_tools.contains("clippy") {
+ candle("ClippyGroup.wxs".as_ref());
+ }
if built_tools.contains("miri") {
candle("MiriGroup.wxs".as_ref());
}
@@ -1870,9 +1879,11 @@ impl Step for Extended {
.arg("CargoGroup.wixobj")
.arg("StdGroup.wixobj")
.arg("AnalysisGroup.wixobj")
- .arg("ClippyGroup.wixobj")
.current_dir(&exe);
+ if built_tools.contains("clippy") {
+ cmd.arg("ClippyGroup.wixobj");
+ }
if built_tools.contains("miri") {
cmd.arg("MiriGroup.wixobj");
}