@@ -19,23 +19,32 @@ fn render_filename<P: AsRef<Path>>(path: P, basedir: Option<&str>) -> CargoResul
1919 relpath. to_str ( ) . ok_or_else ( || internal ( "path not utf-8" ) ) . map ( |f| f. replace ( " " , "\\ " ) )
2020}
2121
22- fn add_deps_for_unit < ' a , ' b > ( deps : & mut HashSet < PathBuf > , context : & mut Context < ' a , ' b > ,
23- unit : & Unit < ' a > , visited : & mut HashSet < Unit < ' a > > ) -> CargoResult < ( ) >
22+ fn add_deps_for_unit < ' a , ' b > (
23+ deps : & mut HashSet < PathBuf > ,
24+ context : & mut Context < ' a , ' b > ,
25+ unit : & Unit < ' a > ,
26+ visited : & mut HashSet < Unit < ' a > > ,
27+ )
28+ -> CargoResult < ( ) >
2429{
2530 if !visited. insert ( * unit) {
2631 return Ok ( ( ) ) ;
2732 }
2833
29- // Add dependencies from rustc dep-info output (stored in fingerprint directory)
30- let dep_info_loc = fingerprint:: dep_info_loc ( context, unit) ;
31- if let Some ( paths) = fingerprint:: parse_dep_info ( & dep_info_loc) ? {
32- for path in paths {
33- deps. insert ( path) ;
34+ // units representing the execution of a build script don't actually
35+ // generate a dep info file, so we just keep on going below
36+ if !unit. profile . run_custom_build {
37+ // Add dependencies from rustc dep-info output (stored in fingerprint directory)
38+ let dep_info_loc = fingerprint:: dep_info_loc ( context, unit) ;
39+ if let Some ( paths) = fingerprint:: parse_dep_info ( & dep_info_loc) ? {
40+ for path in paths {
41+ deps. insert ( path) ;
42+ }
43+ } else {
44+ debug ! ( "can't find dep_info for {:?} {:?}" ,
45+ unit. pkg. package_id( ) , unit. profile) ;
46+ return Err ( internal ( "dep_info missing" ) ) ;
3447 }
35- } else {
36- debug ! ( "can't find dep_info for {:?} {:?}" ,
37- unit. pkg. package_id( ) , unit. profile) ;
38- return Err ( internal ( "dep_info missing" ) ) ;
3948 }
4049
4150 // Add rerun-if-changed dependencies
0 commit comments