@@ -32,6 +32,8 @@ struct ToolBuild {
32
32
extra_features : Vec < String > ,
33
33
/// Nightly-only features that are allowed (comma-separated list).
34
34
allow_features : & ' static str ,
35
+ /// Additional arguments to pass to the `cargo` invocation.
36
+ cargo_args : Vec < String > ,
35
37
}
36
38
37
39
impl Builder < ' _ > {
@@ -100,6 +102,7 @@ impl Step for ToolBuild {
100
102
if !self . allow_features . is_empty ( ) {
101
103
cargo. allow_features ( self . allow_features ) ;
102
104
}
105
+ cargo. args ( self . cargo_args ) ;
103
106
let _guard = builder. msg_tool (
104
107
Kind :: Build ,
105
108
self . mode ,
@@ -283,6 +286,7 @@ macro_rules! bootstrap_tool {
283
286
} ,
284
287
extra_features: vec![ ] ,
285
288
allow_features: concat!( $( $allow_features) * ) ,
289
+ cargo_args: vec![ ]
286
290
} )
287
291
}
288
292
}
@@ -349,6 +353,7 @@ impl Step for OptimizedDist {
349
353
source_type : SourceType :: InTree ,
350
354
extra_features : Vec :: new ( ) ,
351
355
allow_features : "" ,
356
+ cargo_args : Vec :: new ( ) ,
352
357
} )
353
358
}
354
359
}
@@ -403,6 +408,7 @@ impl Step for ErrorIndex {
403
408
source_type : SourceType :: InTree ,
404
409
extra_features : Vec :: new ( ) ,
405
410
allow_features : "" ,
411
+ cargo_args : Vec :: new ( ) ,
406
412
} )
407
413
}
408
414
}
@@ -437,6 +443,7 @@ impl Step for RemoteTestServer {
437
443
source_type : SourceType :: InTree ,
438
444
extra_features : Vec :: new ( ) ,
439
445
allow_features : "" ,
446
+ cargo_args : Vec :: new ( ) ,
440
447
} )
441
448
}
442
449
}
@@ -598,6 +605,7 @@ impl Step for Cargo {
598
605
source_type : SourceType :: Submodule ,
599
606
extra_features : Vec :: new ( ) ,
600
607
allow_features : "" ,
608
+ cargo_args : Vec :: new ( ) ,
601
609
} )
602
610
}
603
611
}
@@ -625,6 +633,7 @@ impl Step for LldWrapper {
625
633
source_type : SourceType :: InTree ,
626
634
extra_features : Vec :: new ( ) ,
627
635
allow_features : "" ,
636
+ cargo_args : Vec :: new ( ) ,
628
637
} )
629
638
}
630
639
}
@@ -673,6 +682,7 @@ impl Step for RustAnalyzer {
673
682
extra_features : vec ! [ "in-rust-tree" . to_owned( ) ] ,
674
683
source_type : SourceType :: InTree ,
675
684
allow_features : RustAnalyzer :: ALLOW_FEATURES ,
685
+ cargo_args : Vec :: new ( ) ,
676
686
} )
677
687
}
678
688
}
@@ -720,6 +730,7 @@ impl Step for RustAnalyzerProcMacroSrv {
720
730
extra_features : vec ! [ "in-rust-tree" . to_owned( ) ] ,
721
731
source_type : SourceType :: InTree ,
722
732
allow_features : RustAnalyzer :: ALLOW_FEATURES ,
733
+ cargo_args : Vec :: new ( ) ,
723
734
} ) ;
724
735
725
736
// Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/`
@@ -916,6 +927,7 @@ macro_rules! tool_extended {
916
927
extra_features: $sel. extra_features,
917
928
source_type: SourceType :: InTree ,
918
929
allow_features: concat!( $( $allow_features) * ) ,
930
+ cargo_args: vec![ ]
919
931
} ) ;
920
932
921
933
if ( false $( || !$add_bins_to_sysroot. is_empty( ) ) ?) && $sel. compiler. stage > 0 {
0 commit comments