Skip to content

Commit d949bba

Browse files
authored
Rollup merge of rust-lang#107830 - tharunsuresh-code:master, r=ozkanonur
Remove missing_tools config Fixes rust-lang#79249 Request to check if run_cargo function has been appropriately modified and what changes need to be made
2 parents adfd715 + e679bd0 commit d949bba

File tree

9 files changed

+97
-281
lines changed

9 files changed

+97
-281
lines changed

config.toml.example

-3
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,6 @@ changelog-seen = 2
798798
# on linux
799799
#src-tarball = true
800800

801-
# Whether to allow failures when building tools
802-
#missing-tools = false
803-
804801
# List of compression formats to use when generating dist tarballs. The list of
805802
# formats is provided to rust-installer, which must support all of them.
806803
#

src/bootstrap/config.rs

-3
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ pub struct Config {
198198
pub save_toolstates: Option<PathBuf>,
199199
pub print_step_timings: bool,
200200
pub print_step_rusage: bool,
201-
pub missing_tools: bool,
202201

203202
// Fallback musl-root for all targets
204203
pub musl_root: Option<PathBuf>,
@@ -696,7 +695,6 @@ define_config! {
696695
gpg_password_file: Option<String> = "gpg-password-file",
697696
upload_addr: Option<String> = "upload-addr",
698697
src_tarball: Option<bool> = "src-tarball",
699-
missing_tools: Option<bool> = "missing-tools",
700698
compression_formats: Option<Vec<String>> = "compression-formats",
701699
}
702700
}
@@ -1301,7 +1299,6 @@ impl Config {
13011299
config.dist_upload_addr = t.upload_addr;
13021300
config.dist_compression_formats = t.compression_formats;
13031301
set(&mut config.rust_dist_src, t.src_tarball);
1304-
set(&mut config.missing_tools, t.missing_tools);
13051302
}
13061303

13071304
if let Some(r) = build.rustfmt {

src/bootstrap/configure.py

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def v(*args):
5757
o("full-tools", None, "enable all tools")
5858
o("lld", "rust.lld", "build lld")
5959
o("clang", "llvm.clang", "build clang")
60-
o("missing-tools", "dist.missing-tools", "allow failures when building tools")
6160
o("use-libcxx", "llvm.use-libcxx", "build LLVM with libc++")
6261
o("control-flow-guard", "rust.control-flow-guard", "Enable Control Flow Guard")
6362

src/bootstrap/dist.rs

+13-24
Original file line numberDiff line numberDiff line change
@@ -1096,9 +1096,7 @@ impl Step for Rls {
10961096
let compiler = self.compiler;
10971097
let target = self.target;
10981098

1099-
let rls = builder
1100-
.ensure(tool::Rls { compiler, target, extra_features: Vec::new() })
1101-
.expect("rls expected to build");
1099+
let rls = builder.ensure(tool::Rls { compiler, target, extra_features: Vec::new() });
11021100

11031101
let mut tarball = Tarball::new(builder, "rls", &target.triple);
11041102
tarball.set_overlay(OverlayKind::RLS);
@@ -1140,10 +1138,7 @@ impl Step for RustAnalyzer {
11401138
let compiler = self.compiler;
11411139
let target = self.target;
11421140

1143-
let rust_analyzer = builder
1144-
.ensure(tool::RustAnalyzer { compiler, target })
1145-
.expect("rust-analyzer always builds");
1146-
1141+
let rust_analyzer = builder.ensure(tool::RustAnalyzer { compiler, target });
11471142
let mut tarball = Tarball::new(builder, "rust-analyzer", &target.triple);
11481143
tarball.set_overlay(OverlayKind::RustAnalyzer);
11491144
tarball.is_preview(true);
@@ -1187,12 +1182,9 @@ impl Step for Clippy {
11871182
// Prepare the image directory
11881183
// We expect clippy to build, because we've exited this step above if tool
11891184
// state for clippy isn't testing.
1190-
let clippy = builder
1191-
.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() })
1192-
.expect("clippy expected to build - essential tool");
1193-
let cargoclippy = builder
1194-
.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() })
1195-
.expect("clippy expected to build - essential tool");
1185+
let clippy = builder.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() });
1186+
let cargoclippy =
1187+
builder.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() });
11961188

11971189
let mut tarball = Tarball::new(builder, "clippy", &target.triple);
11981190
tarball.set_overlay(OverlayKind::Clippy);
@@ -1241,9 +1233,9 @@ impl Step for Miri {
12411233
let compiler = self.compiler;
12421234
let target = self.target;
12431235

1244-
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() })?;
1236+
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() });
12451237
let cargomiri =
1246-
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() })?;
1238+
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() });
12471239

12481240
let mut tarball = Tarball::new(builder, "miri", &target.triple);
12491241
tarball.set_overlay(OverlayKind::Miri);
@@ -1286,12 +1278,10 @@ impl Step for Rustfmt {
12861278
let compiler = self.compiler;
12871279
let target = self.target;
12881280

1289-
let rustfmt = builder
1290-
.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() })
1291-
.expect("rustfmt expected to build - essential tool");
1292-
let cargofmt = builder
1293-
.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() })
1294-
.expect("cargo fmt expected to build - essential tool");
1281+
let rustfmt =
1282+
builder.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() });
1283+
let cargofmt =
1284+
builder.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() });
12951285
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
12961286
tarball.set_overlay(OverlayKind::Rustfmt);
12971287
tarball.is_preview(true);
@@ -1345,9 +1335,8 @@ impl Step for RustDemangler {
13451335
return None;
13461336
}
13471337

1348-
let rust_demangler = builder
1349-
.ensure(tool::RustDemangler { compiler, target, extra_features: Vec::new() })
1350-
.expect("rust-demangler expected to build - in-tree tool");
1338+
let rust_demangler =
1339+
builder.ensure(tool::RustDemangler { compiler, target, extra_features: Vec::new() });
13511340

13521341
// Prepare the image directory
13531342
let mut tarball = Tarball::new(builder, "rust-demangler", &target.triple);

src/bootstrap/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ pub struct Build {
227227
ci_env: CiEnv,
228228
delayed_failures: RefCell<Vec<String>>,
229229
prerelease_version: Cell<Option<u32>>,
230-
tool_artifacts:
231-
RefCell<HashMap<TargetSelection, HashMap<String, (&'static str, PathBuf, Vec<String>)>>>,
232230

233231
#[cfg(feature = "build-metrics")]
234232
metrics: metrics::BuildMetrics,
@@ -447,7 +445,6 @@ impl Build {
447445
ci_env: CiEnv::current(),
448446
delayed_failures: RefCell::new(Vec::new()),
449447
prerelease_version: Cell::new(None),
450-
tool_artifacts: Default::default(),
451448

452449
#[cfg(feature = "build-metrics")]
453450
metrics: metrics::BuildMetrics::init(),

src/bootstrap/run.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,8 @@ impl Step for Miri {
161161
let target = self.target;
162162
let compiler = builder.compiler(stage, host);
163163

164-
let miri = builder
165-
.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() })
166-
.expect("in-tree tool");
164+
let miri =
165+
builder.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() });
167166
let miri_sysroot = test::Miri::build_miri_sysroot(builder, compiler, &miri, target);
168167

169168
// # Run miri.

src/bootstrap/test.rs

+20-23
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl Step for RustAnalyzer {
362362
let host = self.host;
363363
let compiler = builder.compiler(stage, host);
364364

365-
builder.ensure(tool::RustAnalyzer { compiler, target: self.host }).expect("in-tree tool");
365+
builder.ensure(tool::RustAnalyzer { compiler, target: self.host });
366366

367367
let workspace_path = "src/tools/rust-analyzer";
368368
// until the whole RA test suite runs on `i686`, we only run
@@ -420,9 +420,7 @@ impl Step for Rustfmt {
420420
let host = self.host;
421421
let compiler = builder.compiler(stage, host);
422422

423-
builder
424-
.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() })
425-
.expect("in-tree tool");
423+
builder.ensure(tool::Rustfmt { compiler, target: self.host, extra_features: Vec::new() });
426424

427425
let mut cargo = tool::prepare_tool_cargo(
428426
builder,
@@ -469,9 +467,11 @@ impl Step for RustDemangler {
469467
let host = self.host;
470468
let compiler = builder.compiler(stage, host);
471469

472-
let rust_demangler = builder
473-
.ensure(tool::RustDemangler { compiler, target: self.host, extra_features: Vec::new() })
474-
.expect("in-tree tool");
470+
let rust_demangler = builder.ensure(tool::RustDemangler {
471+
compiler,
472+
target: self.host,
473+
extra_features: Vec::new(),
474+
});
475475
let mut cargo = tool::prepare_tool_cargo(
476476
builder,
477477
compiler,
@@ -589,12 +589,13 @@ impl Step for Miri {
589589
// Except if we are at stage 2, the bootstrap loop is complete and we can stick with our current stage.
590590
let compiler_std = builder.compiler(if stage < 2 { stage + 1 } else { stage }, host);
591591

592-
let miri = builder
593-
.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() })
594-
.expect("in-tree tool");
595-
let _cargo_miri = builder
596-
.ensure(tool::CargoMiri { compiler, target: self.host, extra_features: Vec::new() })
597-
.expect("in-tree tool");
592+
let miri =
593+
builder.ensure(tool::Miri { compiler, target: self.host, extra_features: Vec::new() });
594+
let _cargo_miri = builder.ensure(tool::CargoMiri {
595+
compiler,
596+
target: self.host,
597+
extra_features: Vec::new(),
598+
});
598599
// The stdlib we need might be at a different stage. And just asking for the
599600
// sysroot does not seem to populate it, so we do that first.
600601
builder.ensure(compile::Std::new(compiler_std, host));
@@ -732,9 +733,7 @@ impl Step for Clippy {
732733
let host = self.host;
733734
let compiler = builder.compiler(stage, host);
734735

735-
builder
736-
.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() })
737-
.expect("in-tree tool");
736+
builder.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() });
738737
let mut cargo = tool::prepare_tool_cargo(
739738
builder,
740739
compiler,
@@ -1458,13 +1457,11 @@ note: if you're sure you want to do this, please open an issue as to why. In the
14581457
}
14591458

14601459
if mode == "run-make" {
1461-
let rust_demangler = builder
1462-
.ensure(tool::RustDemangler {
1463-
compiler,
1464-
target: compiler.host,
1465-
extra_features: Vec::new(),
1466-
})
1467-
.expect("in-tree tool");
1460+
let rust_demangler = builder.ensure(tool::RustDemangler {
1461+
compiler,
1462+
target: compiler.host,
1463+
extra_features: Vec::new(),
1464+
});
14681465
cmd.arg("--rust-demangler-path").arg(rust_demangler);
14691466
}
14701467

0 commit comments

Comments
 (0)