@@ -21,7 +21,9 @@ use tracing::instrument;
21
21
22
22
use crate :: core:: build_steps:: compile:: { get_codegen_backend_file, normalize_codegen_backend_name} ;
23
23
use crate :: core:: build_steps:: doc:: DocumentationFormat ;
24
- use crate :: core:: build_steps:: tool:: { self , RustcPrivateCompilers , Tool } ;
24
+ use crate :: core:: build_steps:: tool:: {
25
+ self , RustcPrivateCompilers , Tool , ToolTargetBuildMode , get_tool_target_compiler,
26
+ } ;
25
27
use crate :: core:: build_steps:: vendor:: { VENDOR_DIR , Vendor } ;
26
28
use crate :: core:: build_steps:: { compile, llvm} ;
27
29
use crate :: core:: builder:: { Builder , Kind , RunConfig , ShouldRun , Step , StepMetadata } ;
@@ -1293,10 +1295,9 @@ impl Step for Cargo {
1293
1295
1294
1296
fn make_run ( run : RunConfig < ' _ > ) {
1295
1297
run. builder . ensure ( Cargo {
1296
- build_compiler : run. builder . compiler_for (
1297
- run. builder . top_stage ,
1298
- run. builder . config . host_target ,
1299
- run. target ,
1298
+ build_compiler : get_tool_target_compiler (
1299
+ run. builder ,
1300
+ ToolTargetBuildMode :: Build ( run. target ) ,
1300
1301
) ,
1301
1302
target : run. target ,
1302
1303
} ) ;
@@ -1327,6 +1328,10 @@ impl Step for Cargo {
1327
1328
1328
1329
Some ( tarball. generate ( ) )
1329
1330
}
1331
+
1332
+ fn metadata ( & self ) -> Option < StepMetadata > {
1333
+ Some ( StepMetadata :: dist ( "cargo" , self . target ) . built_by ( self . build_compiler ) )
1334
+ }
1330
1335
}
1331
1336
1332
1337
#[ derive( Debug , Clone , Hash , PartialEq , Eq ) ]
0 commit comments