Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove missing_tools config #107830

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -202,7 +202,6 @@ pub struct Config {
pub save_toolstates: Option<PathBuf>,
pub print_step_timings: bool,
pub print_step_rusage: bool,
pub missing_tools: bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this will break anyone who has it set in their config. Is there a procedure for removing settings in such a way to alert people ahead-of-time that their config will no longer work?


// Fallback musl-root for all targets
pub musl_root: Option<PathBuf>,
Expand Down Expand Up @@ -700,7 +699,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 @@ -1306,7 +1304,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 @@ -1103,9 +1103,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 @@ -1147,10 +1145,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 @@ -1194,12 +1189,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 @@ -1248,9 +1240,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 @@ -1293,12 +1285,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 @@ -1352,9 +1342,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 @@ -227,8 +227,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 @@ -447,7 +445,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 @@ -1458,13 +1457,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