@@ -16,7 +16,7 @@ use jobserver::Client;
1616
1717use super :: build_plan:: BuildPlan ;
1818use super :: custom_build:: { self , BuildDeps , BuildScriptOutputs , BuildScripts } ;
19- use super :: fingerprint:: Fingerprint ;
19+ use super :: fingerprint:: { Checksum , Fingerprint } ;
2020use super :: job_queue:: JobQueue ;
2121use super :: layout:: Layout ;
2222use super :: lto:: Lto ;
@@ -50,6 +50,8 @@ pub struct BuildRunner<'a, 'gctx> {
5050 pub fingerprints : HashMap < Unit , Arc < Fingerprint > > ,
5151 /// Cache of file mtimes to reduce filesystem hits.
5252 pub mtime_cache : HashMap < PathBuf , FileTime > ,
53+ /// Cache of file checksums to reduce filesystem reads.
54+ pub checksum_cache : HashMap < PathBuf , Checksum > ,
5355 /// A set used to track which units have been compiled.
5456 /// A unit may appear in the job graph multiple times as a dependency of
5557 /// multiple packages, but it only needs to run once.
@@ -113,6 +115,7 @@ impl<'a, 'gctx> BuildRunner<'a, 'gctx> {
113115 build_script_outputs : Arc :: new ( Mutex :: new ( BuildScriptOutputs :: default ( ) ) ) ,
114116 fingerprints : HashMap :: new ( ) ,
115117 mtime_cache : HashMap :: new ( ) ,
118+ checksum_cache : HashMap :: new ( ) ,
116119 compiled : HashSet :: new ( ) ,
117120 build_scripts : HashMap :: new ( ) ,
118121 build_explicit_deps : HashMap :: new ( ) ,
0 commit comments