Skip to content

Commit da7fdf1

Browse files
KobzolLorrensP-2158466
authored andcommitted
Implement RunMakeSupport tool using the bootstrap_tool! macro
1 parent 72a8b4c commit da7fdf1

File tree

2 files changed

+1
-53
lines changed

2 files changed

+1
-53
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,59 +1242,6 @@ macro_rules! test {
12421242
};
12431243
}
12441244

1245-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
1246-
pub struct RunMakeSupport {
1247-
pub compiler: Compiler,
1248-
pub target: TargetSelection,
1249-
}
1250-
1251-
impl Step for RunMakeSupport {
1252-
type Output = PathBuf;
1253-
const DEFAULT: bool = true;
1254-
1255-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1256-
run.never()
1257-
}
1258-
1259-
fn make_run(run: RunConfig<'_>) {
1260-
let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple());
1261-
run.builder.ensure(RunMakeSupport { compiler, target: run.build_triple() });
1262-
}
1263-
1264-
/// Builds run-make-support and returns the path to the resulting rlib.
1265-
fn run(self, builder: &Builder<'_>) -> PathBuf {
1266-
builder.ensure(compile::Std::new(self.compiler, self.target));
1267-
1268-
let cargo = tool::prepare_tool_cargo(
1269-
builder,
1270-
self.compiler,
1271-
Mode::ToolStd,
1272-
self.target,
1273-
Kind::Build,
1274-
"src/tools/run-make-support",
1275-
SourceType::InTree,
1276-
&[],
1277-
);
1278-
1279-
let _guard = builder.msg_tool(
1280-
Kind::Build,
1281-
Mode::ToolStd,
1282-
"run-make-support",
1283-
self.compiler.stage,
1284-
&self.compiler.host,
1285-
&self.target,
1286-
);
1287-
cargo.into_cmd().run(builder);
1288-
1289-
let lib_name = "librun_make_support.rlib";
1290-
let lib = builder.tools_dir(self.compiler).join(lib_name);
1291-
1292-
let cargo_out = builder.cargo_out(self.compiler, Mode::ToolStd, self.target).join(lib_name);
1293-
builder.copy_link(&cargo_out, &lib);
1294-
lib
1295-
}
1296-
}
1297-
12981245
/// Runs `cargo test` on the `src/tools/run-make-support` crate.
12991246
/// That crate is used by run-make tests.
13001247
#[derive(Debug, Clone, PartialEq, Eq, Hash)]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ bootstrap_tool!(
467467
UnicodeTableGenerator, "src/tools/unicode-table-generator", "unicode-table-generator";
468468
FeaturesStatusDump, "src/tools/features-status-dump", "features-status-dump";
469469
OptimizedDist, "src/tools/opt-dist", "opt-dist", submodules = &["src/tools/rustc-perf"];
470+
RunMakeSupport, "src/tools/run-make-support", "run_make_support", artifact_kind = ToolArtifactKind::Library;
470471
);
471472

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

0 commit comments

Comments
 (0)