@@ -968,39 +968,47 @@ impl Benchmark {
968
968
. run_rustc ( ) ?;
969
969
}
970
970
971
- // An incremental build from scratch (slowest incremental case).
972
- // This is required for any subsequent incremental builds.
973
- if run_kinds. contains ( & RunKind :: IncrFull )
974
- || run_kinds. contains ( & RunKind :: IncrUnchanged )
975
- || run_kinds. contains ( & RunKind :: IncrPatched )
976
- {
977
- self . mk_cargo_process ( compiler, cwd, build_kind)
978
- . incremental ( true )
979
- . processor ( processor, RunKind :: IncrFull , "IncrFull" , None )
980
- . run_rustc ( ) ?;
981
- }
982
-
983
- // An incremental build with no changes (fastest incremental case).
984
- if run_kinds. contains ( & RunKind :: IncrUnchanged ) {
985
- self . mk_cargo_process ( compiler, cwd, build_kind)
986
- . incremental ( true )
987
- . processor ( processor, RunKind :: IncrUnchanged , "IncrUnchanged" , None )
988
- . run_rustc ( ) ?;
989
- }
990
-
991
- if run_kinds. contains ( & RunKind :: IncrPatched ) {
992
- for ( i, patch) in self . patches . iter ( ) . enumerate ( ) {
993
- log:: debug!( "applying patch {}" , patch. name) ;
994
- patch. apply ( cwd) . map_err ( |s| anyhow:: anyhow!( "{}" , s) ) ?;
971
+ // Rustdoc does not support incremental compilation
972
+ if build_kind != BuildKind :: Doc {
973
+ // An incremental build from scratch (slowest incremental case).
974
+ // This is required for any subsequent incremental builds.
975
+ if run_kinds. contains ( & RunKind :: IncrFull )
976
+ || run_kinds. contains ( & RunKind :: IncrUnchanged )
977
+ || run_kinds. contains ( & RunKind :: IncrPatched )
978
+ {
979
+ self . mk_cargo_process ( compiler, cwd, build_kind)
980
+ . incremental ( true )
981
+ . processor ( processor, RunKind :: IncrFull , "IncrFull" , None )
982
+ . run_rustc ( ) ?;
983
+ }
995
984
996
- // An incremental build with some changes (realistic
997
- // incremental case).
998
- let run_kind_str = format ! ( "IncrPatched{}" , i) ;
985
+ // An incremental build with no changes (fastest incremental case).
986
+ if run_kinds. contains ( & RunKind :: IncrUnchanged ) {
999
987
self . mk_cargo_process ( compiler, cwd, build_kind)
1000
988
. incremental ( true )
1001
- . processor ( processor, RunKind :: IncrPatched , & run_kind_str , Some ( & patch ) )
989
+ . processor ( processor, RunKind :: IncrUnchanged , "IncrUnchanged" , None )
1002
990
. run_rustc ( ) ?;
1003
991
}
992
+
993
+ if run_kinds. contains ( & RunKind :: IncrPatched ) {
994
+ for ( i, patch) in self . patches . iter ( ) . enumerate ( ) {
995
+ log:: debug!( "applying patch {}" , patch. name) ;
996
+ patch. apply ( cwd) . map_err ( |s| anyhow:: anyhow!( "{}" , s) ) ?;
997
+
998
+ // An incremental build with some changes (realistic
999
+ // incremental case).
1000
+ let run_kind_str = format ! ( "IncrPatched{}" , i) ;
1001
+ self . mk_cargo_process ( compiler, cwd, build_kind)
1002
+ . incremental ( true )
1003
+ . processor (
1004
+ processor,
1005
+ RunKind :: IncrPatched ,
1006
+ & run_kind_str,
1007
+ Some ( & patch) ,
1008
+ )
1009
+ . run_rustc ( ) ?;
1010
+ }
1011
+ }
1004
1012
}
1005
1013
}
1006
1014
}
0 commit comments