diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-02-04 05:36:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-04 05:36:51 -0500 |
| commit | 648fd0e3efd3d06b12d3e3affe43a31df3f2c13d (patch) | |
| tree | 639e2b76c847096c07c03320aef2af4483e636a1 /src/bootstrap | |
| parent | d2aa3dec8ab901a684ab2347a030f346fec52fb2 (diff) | |
| parent | cbcba57c0549ff24283796ba62c28d30d65d7feb (diff) | |
| download | rust-648fd0e3efd3d06b12d3e3affe43a31df3f2c13d.tar.gz rust-648fd0e3efd3d06b12d3e3affe43a31df3f2c13d.zip | |
Rollup merge of #135844 - yaahc:tidy-feature-status-dump, r=jieyouxu
Add new tool for dumping feature status based on tidy sequel to https://github.com/rust-lang/rust/pull/133514 meaning ... supercedes https://github.com/rust-lang/rust/pull/133351 part of https://github.com/rust-lang/rust/issues/129485 r? `@jieyouxu` cc `@estebank`
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/check.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/run.rs | 31 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/tool.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/mod.rs | 2 |
4 files changed, 35 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index f4a86e26396..21afb031203 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -455,6 +455,7 @@ tool_check_step!(Rls { path: "src/tools/rls" }); tool_check_step!(Rustfmt { path: "src/tools/rustfmt" }); tool_check_step!(MiroptTestTools { path: "src/tools/miropt-test-tools" }); tool_check_step!(TestFloatParse { path: "src/etc/test-float-parse" }); +tool_check_step!(FeaturesStatusDump { path: "src/tools/features-status-dump" }); tool_check_step!(Bootstrap { path: "src/bootstrap", default: false }); diff --git a/src/bootstrap/src/core/build_steps/run.rs b/src/bootstrap/src/core/build_steps/run.rs index 8513c59808c..167b8a5b168 100644 --- a/src/bootstrap/src/core/build_steps/run.rs +++ b/src/bootstrap/src/core/build_steps/run.rs @@ -311,3 +311,34 @@ impl Step for UnicodeTableGenerator { cmd.run(builder); } } + +#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)] +pub struct FeaturesStatusDump; + +impl Step for FeaturesStatusDump { + type Output = (); + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { + run.path("src/tools/features-status-dump") + } + + fn make_run(run: RunConfig<'_>) { + run.builder.ensure(FeaturesStatusDump); + } + + fn run(self, builder: &Builder<'_>) { + let mut cmd = builder.tool_cmd(Tool::FeaturesStatusDump); + + cmd.arg("--library-path"); + cmd.arg(builder.src.join("library")); + + cmd.arg("--compiler-path"); + cmd.arg(builder.src.join("compiler")); + + cmd.arg("--output-path"); + cmd.arg(builder.out.join("features-status-dump.json")); + + cmd.run(builder); + } +} diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index a0abd439de0..75fac88252b 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -365,6 +365,7 @@ bootstrap_tool!( RustcPerfWrapper, "src/tools/rustc-perf-wrapper", "rustc-perf-wrapper"; WasmComponentLd, "src/tools/wasm-component-ld", "wasm-component-ld", is_unstable_tool = true, allow_features = "min_specialization"; UnicodeTableGenerator, "src/tools/unicode-table-generator", "unicode-table-generator"; + FeaturesStatusDump, "src/tools/features-status-dump", "features-status-dump"; ); /// These are the submodules that are required for rustbook to work due to diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index 04a00fde3ab..08421dc1f5b 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -938,6 +938,7 @@ impl<'a> Builder<'a> { check::Bootstrap, check::RunMakeSupport, check::Compiletest, + check::FeaturesStatusDump, ), Kind::Test => describe!( crate::core::build_steps::toolstate::ToolStateCheck, @@ -1089,6 +1090,7 @@ impl<'a> Builder<'a> { run::GenerateWindowsSys, run::GenerateCompletions, run::UnicodeTableGenerator, + run::FeaturesStatusDump, ), Kind::Setup => { describe!(setup::Profile, setup::Hook, setup::Link, setup::Editor) |
