Skip to content

Commit

Permalink
Remove missing_tools config rust-lang#107830
Browse files Browse the repository at this point in the history
  • Loading branch information
tharunsuresh-code committed Feb 12, 2023
1 parent 35d6d70 commit e679bd0
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 281 deletions.
3 changes: 0 additions & 3 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -798,9 +798,6 @@ changelog-seen = 2
# on linux
#src-tarball = true

# Whether to allow failures when building tools
#missing-tools = false

# List of compression formats to use when generating dist tarballs. The list of
# formats is provided to rust-installer, which must support all of them.
#
Expand Down
3 changes: 0 additions & 3 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ pub struct Config {
pub save_toolstates: Option<PathBuf>,
pub print_step_timings: bool,
pub print_step_rusage: bool,
pub missing_tools: bool,

// Fallback musl-root for all targets
pub musl_root: Option<PathBuf>,
Expand Down Expand Up @@ -696,7 +695,6 @@ define_config! {
gpg_password_file: Option<String> = "gpg-password-file",
upload_addr: Option<String> = "upload-addr",
src_tarball: Option<bool> = "src-tarball",
missing_tools: Option<bool> = "missing-tools",
compression_formats: Option<Vec<String>> = "compression-formats",
}
}
Expand Down Expand Up @@ -1301,7 +1299,6 @@ impl Config {
config.dist_upload_addr = t.upload_addr;
config.dist_compression_formats = t.compression_formats;
set(&mut config.rust_dist_src, t.src_tarball);
set(&mut config.missing_tools, t.missing_tools);
}

if let Some(r) = build.rustfmt {
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def v(*args):
o("full-tools", None, "enable all tools")
o("lld", "rust.lld", "build lld")
o("clang", "llvm.clang", "build clang")
o("missing-tools", "dist.missing-tools", "allow failures when building tools")
o("use-libcxx", "llvm.use-libcxx", "build LLVM with libc++")
o("control-flow-guard", "rust.control-flow-guard", "Enable Control Flow Guard")

Expand Down
37 changes: 13 additions & 24 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,7 @@ impl Step for Rls {
let compiler = self.compiler;
let target = self.target;

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

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

let rust_analyzer = builder
.ensure(tool::RustAnalyzer { compiler, target })
.expect("rust-analyzer always builds");

let rust_analyzer = builder.ensure(tool::RustAnalyzer { compiler, target });
let mut tarball = Tarball::new(builder, "rust-analyzer", &target.triple);
tarball.set_overlay(OverlayKind::RustAnalyzer);
tarball.is_preview(true);
Expand Down Expand Up @@ -1187,12 +1182,9 @@ impl Step for Clippy {
// Prepare the image directory
// We expect clippy to build, because we've exited this step above if tool
// state for clippy isn't testing.
let clippy = builder
.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() })
.expect("clippy expected to build - essential tool");
let cargoclippy = builder
.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() })
.expect("clippy expected to build - essential tool");
let clippy = builder.ensure(tool::Clippy { compiler, target, extra_features: Vec::new() });
let cargoclippy =
builder.ensure(tool::CargoClippy { compiler, target, extra_features: Vec::new() });

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

let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() })?;
let miri = builder.ensure(tool::Miri { compiler, target, extra_features: Vec::new() });
let cargomiri =
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() })?;
builder.ensure(tool::CargoMiri { compiler, target, extra_features: Vec::new() });

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

let rustfmt = builder
.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() })
.expect("rustfmt expected to build - essential tool");
let cargofmt = builder
.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() })
.expect("cargo fmt expected to build - essential tool");
let rustfmt =
builder.ensure(tool::Rustfmt { compiler, target, extra_features: Vec::new() });
let cargofmt =
builder.ensure(tool::Cargofmt { compiler, target, extra_features: Vec::new() });
let mut tarball = Tarball::new(builder, "rustfmt", &target.triple);
tarball.set_overlay(OverlayKind::Rustfmt);
tarball.is_preview(true);
Expand Down Expand Up @@ -1345,9 +1335,8 @@ impl Step for RustDemangler {
return None;
}

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

// Prepare the image directory
let mut tarball = Tarball::new(builder, "rust-demangler", &target.triple);
Expand Down
3 changes: 0 additions & 3 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ pub struct Build {
ci_env: CiEnv,
delayed_failures: RefCell<Vec<String>>,
prerelease_version: Cell<Option<u32>>,
tool_artifacts:
RefCell<HashMap<TargetSelection, HashMap<String, (&'static str, PathBuf, Vec<String>)>>>,

#[cfg(feature = "build-metrics")]
metrics: metrics::BuildMetrics,
Expand Down Expand Up @@ -448,7 +446,6 @@ impl Build {
ci_env: CiEnv::current(),
delayed_failures: RefCell::new(Vec::new()),
prerelease_version: Cell::new(None),
tool_artifacts: Default::default(),

#[cfg(feature = "build-metrics")]
metrics: metrics::BuildMetrics::init(),
Expand Down
5 changes: 2 additions & 3 deletions src/bootstrap/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ impl Step for Miri {
let target = self.target;
let compiler = builder.compiler(stage, host);

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

// # Run miri.
Expand Down
43 changes: 20 additions & 23 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ impl Step for RustAnalyzer {
let host = self.host;
let compiler = builder.compiler(stage, host);

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

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

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

let mut cargo = tool::prepare_tool_cargo(
builder,
Expand Down Expand Up @@ -469,9 +467,11 @@ impl Step for RustDemangler {
let host = self.host;
let compiler = builder.compiler(stage, host);

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

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

builder
.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() })
.expect("in-tree tool");
builder.ensure(tool::Clippy { compiler, target: self.host, extra_features: Vec::new() });
let mut cargo = tool::prepare_tool_cargo(
builder,
compiler,
Expand Down Expand Up @@ -1456,13 +1455,11 @@ note: if you're sure you want to do this, please open an issue as to why. In the
}

if mode == "run-make" {
let rust_demangler = builder
.ensure(tool::RustDemangler {
compiler,
target: compiler.host,
extra_features: Vec::new(),
})
.expect("in-tree tool");
let rust_demangler = builder.ensure(tool::RustDemangler {
compiler,
target: compiler.host,
extra_features: Vec::new(),
});
cmd.arg("--rust-demangler-path").arg(rust_demangler);
}

Expand Down
Loading

0 comments on commit e679bd0

Please sign in to comment.