@@ -179,7 +179,8 @@ impl Command {
179179 Command :: Doc { flags } => Self :: doc ( flags) ,
180180 Command :: Fmt { flags } => Self :: fmt ( flags) ,
181181 Command :: Clippy { flags } => Self :: clippy ( flags) ,
182- Command :: Bench { target, benches } => Self :: bench ( target, benches) ,
182+ Command :: Bench { target, no_install, benches } =>
183+ Self :: bench ( target, no_install, benches) ,
183184 Command :: Toolchain { flags } => Self :: toolchain ( flags) ,
184185 Command :: RustcPull { commit } => Self :: rustc_pull ( commit. clone ( ) ) ,
185186 Command :: RustcPush { github_user, branch } => Self :: rustc_push ( github_user, branch) ,
@@ -378,16 +379,18 @@ impl Command {
378379 Ok ( ( ) )
379380 }
380381
381- fn bench ( target : Option < String > , benches : Vec < String > ) -> Result < ( ) > {
382+ fn bench ( target : Option < String > , no_install : bool , benches : Vec < String > ) -> Result < ( ) > {
382383 // The hyperfine to use
383384 let hyperfine = env:: var ( "HYPERFINE" ) ;
384385 let hyperfine = hyperfine. as_deref ( ) . unwrap_or ( "hyperfine -w 1 -m 5 --shell=none" ) ;
385386 let hyperfine = shell_words:: split ( hyperfine) ?;
386387 let Some ( ( program_name, args) ) = hyperfine. split_first ( ) else {
387388 bail ! ( "expected HYPERFINE environment variable to be non-empty" ) ;
388389 } ;
389- // Make sure we have an up-to-date Miri installed and selected the right toolchain.
390- Self :: install ( vec ! [ ] ) ?;
390+ if !no_install {
391+ // Make sure we have an up-to-date Miri installed and selected the right toolchain.
392+ Self :: install ( vec ! [ ] ) ?;
393+ }
391394
392395 let sh = Shell :: new ( ) ?;
393396 sh. change_dir ( miri_dir ( ) ?) ;
0 commit comments