File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ fn main() {
1717    let  target_env = env:: var ( "CARGO_CFG_TARGET_ENV" ) . expect ( "CARGO_CFG_TARGET_ENV was not set" ) ; 
1818    let  cfg = & mut  cc:: Build :: new ( ) ; 
1919
20-     // FIXME: `rerun-if-changed` directives are not currently emitted and the build script 
21-     // will not rerun on changes in these source files or headers included into them. 
2220    let  profile_sources = vec ! [ 
2321        // tidy-alphabetical-start 
2422        "GCDAProfiling.c" , 
@@ -86,6 +84,7 @@ fn main() {
8684
8785    let  src_root = root. join ( "lib" ) . join ( "profile" ) ; 
8886    assert ! ( src_root. exists( ) ,  "profiler runtime source directory not found: {src_root:?}" ) ; 
87+     println ! ( "cargo::rerun-if-changed={}" ,  src_root. display( ) ) ; 
8988    let  mut  n_sources_found = 0u32 ; 
9089    for  src in  profile_sources { 
9190        let  path = src_root. join ( src) ; 
@@ -96,7 +95,10 @@ fn main() {
9695    } 
9796    assert ! ( n_sources_found > 0 ,  "couldn't find any profiler runtime source files in {src_root:?}" ) ; 
9897
99-     cfg. include ( root. join ( "include" ) ) ; 
98+     let  include = root. join ( "include" ) ; 
99+     println ! ( "cargo::rerun-if-changed={}" ,  include. display( ) ) ; 
100+     cfg. include ( include) ; 
101+ 
100102    cfg. warnings ( false ) ; 
101103    cfg. compile ( "profiler-rt" ) ; 
102104} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments