Skip to content

Commit 3748c5e

Browse files
committed
bootstrap: register src/tools/unicode-table-generator as a runnable tool
1 parent d21aa86 commit 3748c5e

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,25 @@ impl Step for GenerateCompletions {
283283
run.builder.ensure(GenerateCompletions);
284284
}
285285
}
286+
287+
#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
288+
pub struct UnicodeTableGenerator;
289+
290+
impl Step for UnicodeTableGenerator {
291+
type Output = ();
292+
const ONLY_HOSTS: bool = true;
293+
294+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
295+
run.path("src/tools/unicode-table-generator")
296+
}
297+
298+
fn make_run(run: RunConfig<'_>) {
299+
run.builder.ensure(UnicodeTableGenerator);
300+
}
301+
302+
fn run(self, builder: &Builder<'_>) {
303+
let mut cmd = builder.tool_cmd(Tool::UnicodeTableGenerator);
304+
cmd.arg(builder.src.join("library/core/src/unicode/unicode_data.rs"));
305+
cmd.run(builder);
306+
}
307+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ bootstrap_tool!(
360360
CoverageDump, "src/tools/coverage-dump", "coverage-dump";
361361
RustcPerfWrapper, "src/tools/rustc-perf-wrapper", "rustc-perf-wrapper";
362362
WasmComponentLd, "src/tools/wasm-component-ld", "wasm-component-ld", is_unstable_tool = true, allow_features = "min_specialization";
363+
UnicodeTableGenerator, "src/tools/unicode-table-generator", "unicode-table-generator";
363364
);
364365

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

src/bootstrap/src/core/builder.rs

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

0 commit comments

Comments
 (0)