- builder.ensure(ToolBuild {
- compiler: self.compiler,
- target: self.target,
- tool: "rls",
- mode: Mode::Librustc,
- path: "src/tools/rls",
- expectation: builder.build.config.toolstate.rls.passes(ToolState::Compiling),
- })
- }
-}
-
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct Rustfmt {
- pub compiler: Compiler,
- pub target: Interned<String>,
-}
-
-impl Step for Rustfmt {
- type Output = Option<PathBuf>;
- const DEFAULT: bool = true;
- const ONLY_HOSTS: bool = true;
-
- fn should_run(run: ShouldRun) -> ShouldRun {
- let builder = run.builder;
- run.path("src/tools/rustfmt").default_condition(builder.build.config.extended)
- }
-
- fn make_run(run: RunConfig) {
- run.builder.ensure(Rustfmt {
- compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
- target: run.target,
- });
- }
-
- fn run(self, builder: &Builder) -> Option<PathBuf> {
- builder.ensure(ToolBuild {
- compiler: self.compiler,
- target: self.target,
- tool: "rustfmt",
- mode: Mode::Librustc,
- path: "src/tools/rustfmt",
- expectation: builder.build.config.toolstate.rustfmt.passes(ToolState::Compiling),
- })
- }
-}
-
-
-#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
-pub struct Miri {
- pub compiler: Compiler,
- pub target: Interned<String>,
-}
-
-impl Step for Miri {
- type Output = Option<PathBuf>;
- const DEFAULT: bool = true;
- const ONLY_HOSTS: bool = true;
-
- fn should_run(run: ShouldRun) -> ShouldRun {
- let build_miri = run.builder.build.config.test_miri;
- run.path("src/tools/miri").default_condition(build_miri)
- }
-
- fn make_run(run: RunConfig) {
- run.builder.ensure(Miri {
- compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build),
- target: run.target,
- });
- }
-
- fn run(self, builder: &Builder) -> Option<PathBuf> {
- builder.ensure(ToolBuild {
- compiler: self.compiler,
- target: self.target,
- tool: "miri",
- mode: Mode::Librustc,
- path: "src/tools/miri",
- expectation: builder.build.config.toolstate.miri.passes(ToolState::Compiling),
- })
- }
-}