@@ -20,6 +20,7 @@ use crate::core::build_steps::llvm;
20
20
use crate :: core:: build_steps:: synthetic_targets:: MirOptPanicAbortSyntheticTarget ;
21
21
use crate :: core:: build_steps:: tool:: { self , SourceType , Tool } ;
22
22
use crate :: core:: build_steps:: toolstate:: ToolState ;
23
+ use crate :: core:: builder;
23
24
use crate :: core:: builder:: crate_description;
24
25
use crate :: core:: builder:: { Builder , Compiler , Kind , RunConfig , ShouldRun , Step } ;
25
26
use crate :: core:: config:: flags:: get_completion;
@@ -380,7 +381,7 @@ impl Step for RustAnalyzer {
380
381
// work in Rust CI
381
382
cargo. env ( "SKIP_SLOW_TESTS" , "1" ) ;
382
383
383
- cargo. add_rustc_lib_path ( builder, compiler ) ;
384
+ cargo. add_rustc_lib_path ( builder) ;
384
385
run_cargo_test ( cargo, & [ ] , & [ ] , "rust-analyzer" , "rust-analyzer" , compiler, host, builder) ;
385
386
}
386
387
}
@@ -426,7 +427,7 @@ impl Step for Rustfmt {
426
427
t ! ( fs:: create_dir_all( & dir) ) ;
427
428
cargo. env ( "RUSTFMT_TEST_DIR" , dir) ;
428
429
429
- cargo. add_rustc_lib_path ( builder, compiler ) ;
430
+ cargo. add_rustc_lib_path ( builder) ;
430
431
431
432
run_cargo_test ( cargo, & [ ] , & [ ] , "rustfmt" , "rustfmt" , compiler, host, builder) ;
432
433
}
@@ -476,7 +477,7 @@ impl Step for RustDemangler {
476
477
t ! ( fs:: create_dir_all( & dir) ) ;
477
478
478
479
cargo. env ( "RUST_DEMANGLER_DRIVER_PATH" , rust_demangler) ;
479
- cargo. add_rustc_lib_path ( builder, compiler ) ;
480
+ cargo. add_rustc_lib_path ( builder) ;
480
481
481
482
run_cargo_test (
482
483
cargo,
@@ -517,7 +518,7 @@ impl Miri {
517
518
SourceType :: InTree ,
518
519
& [ ] ,
519
520
) ;
520
- cargo. add_rustc_lib_path ( builder, compiler ) ;
521
+ cargo. add_rustc_lib_path ( builder) ;
521
522
cargo. arg ( "--" ) . arg ( "miri" ) . arg ( "setup" ) ;
522
523
cargo. arg ( "--target" ) . arg ( target. rustc_target_arg ( ) ) ;
523
524
@@ -618,7 +619,7 @@ impl Step for Miri {
618
619
) ;
619
620
let _guard = builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , "miri" , host, target) ;
620
621
621
- cargo. add_rustc_lib_path ( builder, compiler ) ;
622
+ cargo. add_rustc_lib_path ( builder) ;
622
623
623
624
// miri tests need to know about the stage sysroot
624
625
cargo. env ( "MIRI_SYSROOT" , & miri_sysroot) ;
@@ -671,7 +672,7 @@ impl Step for Miri {
671
672
SourceType :: Submodule ,
672
673
& [ ] ,
673
674
) ;
674
- cargo. add_rustc_lib_path ( builder, compiler ) ;
675
+ cargo. add_rustc_lib_path ( builder) ;
675
676
cargo. arg ( "--" ) . arg ( "miri" ) . arg ( "test" ) ;
676
677
if builder. config . locked_deps {
677
678
cargo. arg ( "--locked" ) ;
@@ -788,7 +789,7 @@ impl Step for Clippy {
788
789
let host_libs = builder. stage_out ( compiler, Mode :: ToolRustc ) . join ( builder. cargo_dir ( ) ) ;
789
790
cargo. env ( "HOST_LIBS" , host_libs) ;
790
791
791
- cargo. add_rustc_lib_path ( builder, compiler ) ;
792
+ cargo. add_rustc_lib_path ( builder) ;
792
793
let mut cargo = prepare_cargo_test ( cargo, & [ ] , & [ ] , "clippy" , compiler, host, builder) ;
793
794
794
795
let _guard = builder. msg_sysroot_tool ( Kind :: Test , compiler. stage , "clippy" , host, host) ;
@@ -2499,8 +2500,15 @@ impl Step for Crate {
2499
2500
// we're working with automatically.
2500
2501
let compiler = builder. compiler_for ( compiler. stage , compiler. host , target) ;
2501
2502
2502
- let mut cargo =
2503
- builder. cargo ( compiler, mode, SourceType :: InTree , target, builder. kind . as_str ( ) ) ;
2503
+ let mut cargo = builder:: Cargo :: new (
2504
+ builder,
2505
+ compiler,
2506
+ mode,
2507
+ SourceType :: InTree ,
2508
+ target,
2509
+ builder. kind . as_str ( ) ,
2510
+ ) ;
2511
+
2504
2512
match mode {
2505
2513
Mode :: Std => {
2506
2514
compile:: std_cargo ( builder, target, compiler. stage , & mut cargo) ;
@@ -3134,13 +3142,15 @@ impl Step for CodegenCranelift {
3134
3142
let compiler = builder. compiler_for ( compiler. stage , compiler. host , target) ;
3135
3143
3136
3144
let build_cargo = || {
3137
- let mut cargo = builder. cargo (
3145
+ let mut cargo = builder:: Cargo :: new (
3146
+ builder,
3138
3147
compiler,
3139
3148
Mode :: Codegen , // Must be codegen to ensure dlopen on compiled dylibs works
3140
3149
SourceType :: InTree ,
3141
3150
target,
3142
3151
"run" ,
3143
3152
) ;
3153
+
3144
3154
cargo. current_dir ( & builder. src . join ( "compiler/rustc_codegen_cranelift" ) ) ;
3145
3155
cargo
3146
3156
. arg ( "--manifest-path" )
@@ -3260,13 +3270,15 @@ impl Step for CodegenGCC {
3260
3270
let compiler = builder. compiler_for ( compiler. stage , compiler. host , target) ;
3261
3271
3262
3272
let build_cargo = || {
3263
- let mut cargo = builder. cargo (
3273
+ let mut cargo = builder:: Cargo :: new (
3274
+ builder,
3264
3275
compiler,
3265
3276
Mode :: Codegen , // Must be codegen to ensure dlopen on compiled dylibs works
3266
3277
SourceType :: InTree ,
3267
3278
target,
3268
3279
"run" ,
3269
3280
) ;
3281
+
3270
3282
cargo. current_dir ( & builder. src . join ( "compiler/rustc_codegen_gcc" ) ) ;
3271
3283
cargo
3272
3284
. arg ( "--manifest-path" )
0 commit comments