diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-11 19:53:55 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-13 08:11:00 +0200 |
| commit | 92e1541f76106601bf33d3fe2bc0564b97c85d6e (patch) | |
| tree | a6caed2dfc6e70895ca5e0f318d5f95dd9d86f08 | |
| parent | 75c5c36c0fe9f583773b2a21910ad920bca6abbe (diff) | |
| download | rust-92e1541f76106601bf33d3fe2bc0564b97c85d6e.tar.gz rust-92e1541f76106601bf33d3fe2bc0564b97c85d6e.zip | |
Only check rustc when linting rustc_codegen_gcc
| -rw-r--r-- | src/bootstrap/src/core/build_steps/clippy.rs | 13 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/tests.rs | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs index b71e5fbb95c..2f1adde7016 100644 --- a/src/bootstrap/src/core/build_steps/clippy.rs +++ b/src/bootstrap/src/core/build_steps/clippy.rs @@ -13,7 +13,7 @@ //! (as usual) a massive undertaking/refactoring. use super::compile::{run_cargo, rustc_cargo, std_cargo}; -use super::tool::{RustcPrivateCompilers, SourceType, prepare_tool_cargo}; +use super::tool::{SourceType, prepare_tool_cargo}; use crate::builder::{Builder, ShouldRun}; use crate::core::build_steps::check::prepare_compiler_for_check; use crate::core::build_steps::compile::std_crates_for_run_make; @@ -306,7 +306,7 @@ impl Step for Rustc { #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub struct CodegenGcc { - compilers: RustcPrivateCompilers, + build_compiler: Compiler, target: TargetSelection, config: LintConfig, } @@ -314,7 +314,7 @@ pub struct CodegenGcc { impl CodegenGcc { fn new(builder: &Builder<'_>, target: TargetSelection, config: LintConfig) -> Self { Self { - compilers: RustcPrivateCompilers::new(builder, builder.top_stage, target), + build_compiler: prepare_compiler_for_check(builder, target, Mode::Codegen), target, config, } @@ -335,7 +335,7 @@ impl Step for CodegenGcc { } fn run(self, builder: &Builder<'_>) -> Self::Output { - let build_compiler = self.compilers.build_compiler(); + let build_compiler = self.build_compiler; let target = self.target; let cargo = prepare_tool_cargo( @@ -367,10 +367,7 @@ impl Step for CodegenGcc { } fn metadata(&self) -> Option<StepMetadata> { - Some( - StepMetadata::clippy("rustc_codegen_gcc", self.target) - .built_by(self.compilers.build_compiler()), - ) + Some(StepMetadata::clippy("rustc_codegen_gcc", self.target).built_by(self.build_compiler)) } } diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 7fdbdd05fb6..226732cd2af 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -2080,6 +2080,7 @@ mod snapshot { [build] rustc 0 <host> -> cargo-clippy 1 <host> [clippy] rustc 1 <host> -> std 1 <host> [clippy] rustc 0 <host> -> rustc 1 <host> + [check] rustc 0 <host> -> rustc 1 <host> [clippy] rustc 0 <host> -> rustc_codegen_gcc 1 <host> "); } @@ -2103,6 +2104,7 @@ mod snapshot { [build] rustc 1 <host> -> cargo-clippy 2 <host> [clippy] rustc 2 <host> -> std 2 <host> [clippy] rustc 1 <host> -> rustc 2 <host> + [check] rustc 1 <host> -> rustc 2 <host> [clippy] rustc 1 <host> -> rustc_codegen_gcc 2 <host> "); } |
