@@ -1140,6 +1140,7 @@ macro_rules! tool_extended {
1140
1140
stable: $stable: expr
1141
1141
$( , add_bins_to_sysroot: $add_bins_to_sysroot: expr ) ?
1142
1142
$( , add_features: $add_features: expr ) ?
1143
+ $( , cargo_args: $cargo_args: expr ) ?
1143
1144
$( , ) ?
1144
1145
}
1145
1146
) => {
@@ -1180,6 +1181,7 @@ macro_rules! tool_extended {
1180
1181
$path,
1181
1182
None $( . or( Some ( & $add_bins_to_sysroot) ) ) ?,
1182
1183
None $( . or( Some ( $add_features) ) ) ?,
1184
+ None $( . or( Some ( $cargo_args) ) ) ?,
1183
1185
)
1184
1186
}
1185
1187
@@ -1227,6 +1229,7 @@ fn run_tool_build_step(
1227
1229
path : & ' static str ,
1228
1230
add_bins_to_sysroot : Option < & [ & str ] > ,
1229
1231
add_features : Option < fn ( & Builder < ' _ > , TargetSelection , & mut Vec < String > ) > ,
1232
+ cargo_args : Option < & [ & ' static str ] > ,
1230
1233
) -> ToolBuildResult {
1231
1234
let mut extra_features = Vec :: new ( ) ;
1232
1235
if let Some ( func) = add_features {
@@ -1243,7 +1246,7 @@ fn run_tool_build_step(
1243
1246
extra_features,
1244
1247
source_type : SourceType :: InTree ,
1245
1248
allow_features : "" ,
1246
- cargo_args : vec ! [ ] ,
1249
+ cargo_args : cargo_args . unwrap_or_default ( ) . iter ( ) . map ( |s| String :: from ( * s ) ) . collect ( ) ,
1247
1250
artifact_kind : ToolArtifactKind :: Binary ,
1248
1251
} ) ;
1249
1252
@@ -1294,7 +1297,9 @@ tool_extended!(Miri {
1294
1297
path: "src/tools/miri" ,
1295
1298
tool_name: "miri" ,
1296
1299
stable: false ,
1297
- add_bins_to_sysroot: [ "miri" ]
1300
+ add_bins_to_sysroot: [ "miri" ] ,
1301
+ // Avoid costly rebuilds by always including the tests.
1302
+ cargo_args: & [ "--all-targets" ] ,
1298
1303
} ) ;
1299
1304
tool_extended ! ( CargoMiri {
1300
1305
path: "src/tools/miri/cargo-miri" ,
0 commit comments