Skip to content

Commit 807f6ff

Browse files
committed
Implement RunMakeSupport tool using the bootstrap_tool! macro
1 parent 96a9197 commit 807f6ff

File tree

2 files changed

+1
-53
lines changed

2 files changed

+1
-53
lines changed

Diff for: src/bootstrap/src/core/build_steps/test.rs

-53
Original file line numberDiff line numberDiff line change
@@ -1230,59 +1230,6 @@ macro_rules! test {
12301230
};
12311231
}
12321232

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

Diff for: src/bootstrap/src/core/build_steps/tool.rs

+1
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)