diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-15 20:11:45 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-23 11:00:31 +0200 |
| commit | 1f7f7f55a8b63f36d0ca91b46f2a4e0bcb606b8a (patch) | |
| tree | 7e43ea6bca062364ba9be3bfa83b93aa773c9543 /src/bootstrap | |
| parent | 693e2aec4e61f413a9b138cd499fd77a1544cbc4 (diff) | |
| download | rust-1f7f7f55a8b63f36d0ca91b46f2a4e0bcb606b8a.tar.gz rust-1f7f7f55a8b63f36d0ca91b46f2a4e0bcb606b8a.zip | |
Remove `compiler_for` from `dist::Miri`
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/dist.rs | 20 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/install.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/tests.rs | 3 |
3 files changed, 13 insertions, 12 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index f6379f7e71e..f3276ebf731 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1426,7 +1426,7 @@ impl Step for Clippy { #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct Miri { - pub build_compiler: Compiler, + pub compilers: RustcPrivateCompilers, pub target: TargetSelection, } @@ -1442,11 +1442,7 @@ impl Step for Miri { fn make_run(run: RunConfig<'_>) { run.builder.ensure(Miri { - build_compiler: run.builder.compiler_for( - run.builder.top_stage, - run.builder.config.host_target, - run.target, - ), + compilers: RustcPrivateCompilers::new(run.builder, run.builder.top_stage, run.target), target: run.target, }); } @@ -1459,10 +1455,8 @@ impl Step for Miri { return None; } - let compilers = - RustcPrivateCompilers::from_build_compiler(builder, self.build_compiler, self.target); - let miri = builder.ensure(tool::Miri::from_compilers(compilers)); - let cargomiri = builder.ensure(tool::CargoMiri::from_compilers(compilers)); + let miri = builder.ensure(tool::Miri::from_compilers(self.compilers)); + let cargomiri = builder.ensure(tool::CargoMiri::from_compilers(self.compilers)); let mut tarball = Tarball::new(builder, "miri", &self.target.triple); tarball.set_overlay(OverlayKind::Miri); @@ -1472,6 +1466,10 @@ impl Step for Miri { tarball.add_legal_and_readme_to("share/doc/miri"); Some(tarball.generate()) } + + fn metadata(&self) -> Option<StepMetadata> { + Some(StepMetadata::dist("miri", self.target).built_by(self.compilers.build_compiler())) + } } #[derive(Debug, Clone, Hash, PartialEq, Eq)] @@ -1677,7 +1675,7 @@ impl Step for Extended { add_component!("rust-analyzer" => RustAnalyzer { compilers: rustc_private_compilers, target }); add_component!("llvm-components" => LlvmTools { target }); add_component!("clippy" => Clippy { compilers: rustc_private_compilers, target }); - add_component!("miri" => Miri { build_compiler: compiler, target }); + add_component!("miri" => Miri { compilers: rustc_private_compilers, target }); add_component!("analysis" => Analysis { build_compiler: compiler, target }); add_component!("rustc-codegen-cranelift" => CraneliftCodegenBackend { build_compiler: compiler, diff --git a/src/bootstrap/src/core/build_steps/install.rs b/src/bootstrap/src/core/build_steps/install.rs index aea54512f7c..da3eef74b2b 100644 --- a/src/bootstrap/src/core/build_steps/install.rs +++ b/src/bootstrap/src/core/build_steps/install.rs @@ -244,7 +244,7 @@ install!((self, builder, _config), install_sh(builder, "clippy", self.compiler.stage, Some(self.target), &tarball); }; Miri, alias = "miri", Self::should_build(_config), IS_HOST: true, { - if let Some(tarball) = builder.ensure(dist::Miri { build_compiler: self.compiler, target: self.target }) { + if let Some(tarball) = builder.ensure(dist::Miri { compilers: RustcPrivateCompilers::from_build_compiler(builder, self.compiler, self.target) , target: self.target }) { install_sh(builder, "miri", self.compiler.stage, Some(self.target), &tarball); } else { // Miri is only available on nightly diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 2a922d5f4b8..1646c4bd631 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -1211,6 +1211,7 @@ mod snapshot { [dist] rustc 1 <host> -> clippy 2 <host> [build] rustc 1 <host> -> miri 2 <host> [build] rustc 1 <host> -> cargo-miri 2 <host> + [dist] rustc 1 <host> -> miri 2 <host> "); } @@ -1543,6 +1544,7 @@ mod snapshot { [dist] rustc 1 <host> -> clippy 2 <target1> [build] rustc 1 <host> -> miri 2 <target1> [build] rustc 1 <host> -> cargo-miri 2 <target1> + [dist] rustc 1 <host> -> miri 2 <target1> [build] rustc 1 <host> -> LlvmBitcodeLinker 2 <target1> [doc] rustc 2 <target1> -> std 2 <target1> crates=[] "); @@ -2330,6 +2332,7 @@ mod snapshot { [dist] rustc 2 <host> -> clippy 3 <host> [build] rustc 2 <host> -> miri 3 <host> [build] rustc 2 <host> -> cargo-miri 3 <host> + [dist] rustc 2 <host> -> miri 3 <host> [dist] src <> "); } |
