Skip to content

Commit a542953

Browse files
committed
bootstrap: register features-status-dump as runnable tool
1 parent a5e5453 commit a542953

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

src/bootstrap/src/core/build_steps/run.rs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,34 @@ impl Step for UnicodeTableGenerator {
304304
cmd.run(builder);
305305
}
306306
}
307+
308+
#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
309+
pub struct FeaturesStatusDump;
310+
311+
impl Step for FeaturesStatusDump {
312+
type Output = ();
313+
const ONLY_HOSTS: bool = true;
314+
315+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
316+
run.path("src/tools/features-status-dump")
317+
}
318+
319+
fn make_run(run: RunConfig<'_>) {
320+
run.builder.ensure(FeaturesStatusDump);
321+
}
322+
323+
fn run(self, builder: &Builder<'_>) {
324+
let mut cmd = builder.tool_cmd(Tool::FeaturesStatusDump);
325+
326+
cmd.arg("--library-path");
327+
cmd.arg(builder.src.join("library"));
328+
329+
cmd.arg("--compiler-path");
330+
cmd.arg(builder.src.join("compiler"));
331+
332+
cmd.arg("--output-path");
333+
cmd.arg(builder.out.join("features-status-dump.json"));
334+
335+
cmd.run(builder);
336+
}
337+
}

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ bootstrap_tool!(
359359
RustcPerfWrapper, "src/tools/rustc-perf-wrapper", "rustc-perf-wrapper";
360360
WasmComponentLd, "src/tools/wasm-component-ld", "wasm-component-ld", is_unstable_tool = true, allow_features = "min_specialization";
361361
UnicodeTableGenerator, "src/tools/unicode-table-generator", "unicode-table-generator";
362+
FeaturesStatusDump, "src/tools/features-status-dump", "features-status-dump";
362363
);
363364

364365
/// These are the submodules that are required for rustbook to work due to

src/bootstrap/src/core/builder/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ impl<'a> Builder<'a> {
10091009
run::GenerateWindowsSys,
10101010
run::GenerateCompletions,
10111011
run::UnicodeTableGenerator,
1012+
run::FeaturesStatusDump,
10121013
),
10131014
Kind::Setup => {
10141015
describe!(setup::Profile, setup::Hook, setup::Link, setup::Editor)

0 commit comments

Comments
 (0)