@@ -144,7 +144,7 @@ impl Step for Std {
144
144
builder. require_submodule ( "library/stdarch" , None ) ;
145
145
146
146
let target = self . target ;
147
- let compiler = builder. compiler ( builder. top_stage , builder. config . build ) ;
147
+ let compiler = builder. compiler ( builder. top_stage , builder. config . build , false ) ;
148
148
149
149
let mut cargo = builder:: Cargo :: new (
150
150
builder,
@@ -204,7 +204,7 @@ impl Step for Rustc {
204
204
/// This will lint the compiler for a particular stage of the build using
205
205
/// the `compiler` targeting the `target` architecture.
206
206
fn run ( self , builder : & Builder < ' _ > ) {
207
- let compiler = builder. compiler ( builder. top_stage , builder. config . build ) ;
207
+ let compiler = builder. compiler ( builder. top_stage , builder. config . build , false ) ;
208
208
let target = self . target ;
209
209
210
210
if compiler. stage != 0 {
@@ -254,7 +254,7 @@ impl Step for Rustc {
254
254
255
255
macro_rules! lint_any {
256
256
( $(
257
- $name: ident, $path: expr, $readable_name: expr
257
+ $name: ident, $path: expr, $readable_name: expr, $mode : expr
258
258
$( , lint_by_default = $lint_by_default: expr) *
259
259
;
260
260
) +) => {
@@ -283,15 +283,15 @@ macro_rules! lint_any {
283
283
}
284
284
285
285
fn run( self , builder: & Builder <' _>) -> Self :: Output {
286
- let compiler = builder. compiler( builder. top_stage, builder. config. build) ;
286
+ let compiler = builder. compiler( builder. top_stage, builder. config. build, $mode == Mode :: ToolRustc ) ;
287
287
let target = self . target;
288
288
289
289
builder. ensure( check:: Rustc :: new( target, builder) . build_kind( Some ( Kind :: Check ) ) ) ;
290
290
291
291
let cargo = prepare_tool_cargo(
292
292
builder,
293
293
compiler,
294
- Mode :: ToolRustc ,
294
+ $mode ,
295
295
target,
296
296
Kind :: Clippy ,
297
297
$path,
@@ -301,15 +301,15 @@ macro_rules! lint_any {
301
301
302
302
let _guard = builder. msg_tool(
303
303
Kind :: Clippy ,
304
- Mode :: ToolRustc ,
304
+ $mode ,
305
305
$readable_name,
306
306
compiler. stage,
307
307
& compiler. host,
308
308
& target,
309
309
) ;
310
310
311
311
let stringified_name = stringify!( $name) . to_lowercase( ) ;
312
- let stamp = BuildStamp :: new( & builder. cargo_out( compiler, Mode :: ToolRustc , target) )
312
+ let stamp = BuildStamp :: new( & builder. cargo_out( compiler, $mode , target) )
313
313
. with_prefix( & format!( "{}-check" , stringified_name) ) ;
314
314
315
315
run_cargo(
@@ -328,31 +328,31 @@ macro_rules! lint_any {
328
328
}
329
329
330
330
lint_any ! (
331
- Bootstrap , "src/bootstrap" , "bootstrap" ;
332
- BuildHelper , "src/build_helper" , "build_helper" ;
333
- BuildManifest , "src/tools/build-manifest" , "build-manifest" ;
334
- CargoMiri , "src/tools/miri/cargo-miri" , "cargo-miri" ;
335
- Clippy , "src/tools/clippy" , "clippy" ;
336
- CollectLicenseMetadata , "src/tools/collect-license-metadata" , "collect-license-metadata" ;
337
- CodegenGcc , "compiler/rustc_codegen_gcc" , "rustc-codegen-gcc" ;
338
- Compiletest , "src/tools/compiletest" , "compiletest" ;
339
- CoverageDump , "src/tools/coverage-dump" , "coverage-dump" ;
340
- Jsondocck , "src/tools/jsondocck" , "jsondocck" ;
341
- Jsondoclint , "src/tools/jsondoclint" , "jsondoclint" ;
342
- LintDocs , "src/tools/lint-docs" , "lint-docs" ;
343
- LlvmBitcodeLinker , "src/tools/llvm-bitcode-linker" , "llvm-bitcode-linker" ;
344
- Miri , "src/tools/miri" , "miri" ;
345
- MiroptTestTools , "src/tools/miropt-test-tools" , "miropt-test-tools" ;
346
- OptDist , "src/tools/opt-dist" , "opt-dist" ;
347
- RemoteTestClient , "src/tools/remote-test-client" , "remote-test-client" ;
348
- RemoteTestServer , "src/tools/remote-test-server" , "remote-test-server" ;
349
- Rls , "src/tools/rls" , "rls" ;
350
- RustAnalyzer , "src/tools/rust-analyzer" , "rust-analyzer" ;
351
- Rustdoc , "src/librustdoc" , "clippy" ;
352
- Rustfmt , "src/tools/rustfmt" , "rustfmt" ;
353
- RustInstaller , "src/tools/rust-installer" , "rust-installer" ;
354
- Tidy , "src/tools/tidy" , "tidy" ;
355
- TestFloatParse , "src/etc/test-float-parse" , "test-float-parse" ;
331
+ Bootstrap , "src/bootstrap" , "bootstrap" , Mode :: ToolBootstrap ;
332
+ BuildHelper , "src/build_helper" , "build_helper" , Mode :: ToolBootstrap ;
333
+ BuildManifest , "src/tools/build-manifest" , "build-manifest" , Mode :: ToolBootstrap ;
334
+ CargoMiri , "src/tools/miri/cargo-miri" , "cargo-miri" , Mode :: ToolRustc ;
335
+ Clippy , "src/tools/clippy" , "clippy" , Mode :: ToolRustc ;
336
+ CollectLicenseMetadata , "src/tools/collect-license-metadata" , "collect-license-metadata" , Mode :: ToolBootstrap ;
337
+ CodegenGcc , "compiler/rustc_codegen_gcc" , "rustc-codegen-gcc" , Mode :: ToolRustc ;
338
+ Compiletest , "src/tools/compiletest" , "compiletest" , Mode :: ToolBootstrap ;
339
+ CoverageDump , "src/tools/coverage-dump" , "coverage-dump" , Mode :: ToolBootstrap ;
340
+ Jsondocck , "src/tools/jsondocck" , "jsondocck" , Mode :: ToolBootstrap ;
341
+ Jsondoclint , "src/tools/jsondoclint" , "jsondoclint" , Mode :: ToolBootstrap ;
342
+ LintDocs , "src/tools/lint-docs" , "lint-docs" , Mode :: ToolBootstrap ;
343
+ LlvmBitcodeLinker , "src/tools/llvm-bitcode-linker" , "llvm-bitcode-linker" , Mode :: ToolRustc ;
344
+ Miri , "src/tools/miri" , "miri" , Mode :: ToolRustc ;
345
+ MiroptTestTools , "src/tools/miropt-test-tools" , "miropt-test-tools" , Mode :: ToolRustc ;
346
+ OptDist , "src/tools/opt-dist" , "opt-dist" , Mode :: ToolBootstrap ;
347
+ RemoteTestClient , "src/tools/remote-test-client" , "remote-test-client" , Mode :: ToolBootstrap ;
348
+ RemoteTestServer , "src/tools/remote-test-server" , "remote-test-server" , Mode :: ToolBootstrap ;
349
+ Rls , "src/tools/rls" , "rls" , Mode :: ToolBootstrap ;
350
+ RustAnalyzer , "src/tools/rust-analyzer" , "rust-analyzer" , Mode :: ToolRustc ;
351
+ Rustdoc , "src/librustdoc" , "clippy" , Mode :: ToolRustc ;
352
+ Rustfmt , "src/tools/rustfmt" , "rustfmt" , Mode :: ToolRustc ;
353
+ RustInstaller , "src/tools/rust-installer" , "rust-installer" , Mode :: ToolBootstrap ;
354
+ Tidy , "src/tools/tidy" , "tidy" , Mode :: ToolBootstrap ;
355
+ TestFloatParse , "src/etc/test-float-parse" , "test-float-parse" , Mode :: ToolStd ;
356
356
) ;
357
357
358
358
#[ derive( Debug , Clone , PartialEq , Eq , Hash ) ]
0 commit comments