File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ fn main() {
17
17
let target_env = env:: var ( "CARGO_CFG_TARGET_ENV" ) . expect ( "CARGO_CFG_TARGET_ENV was not set" ) ;
18
18
let cfg = & mut cc:: Build :: new ( ) ;
19
19
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.
22
20
let profile_sources = vec ! [
23
21
// tidy-alphabetical-start
24
22
"GCDAProfiling.c" ,
@@ -86,6 +84,7 @@ fn main() {
86
84
87
85
let src_root = root. join ( "lib" ) . join ( "profile" ) ;
88
86
assert ! ( src_root. exists( ) , "profiler runtime source directory not found: {src_root:?}" ) ;
87
+ println ! ( "cargo::rerun-if-changed={}" , src_root. display( ) ) ;
89
88
let mut n_sources_found = 0u32 ;
90
89
for src in profile_sources {
91
90
let path = src_root. join ( src) ;
@@ -96,7 +95,10 @@ fn main() {
96
95
}
97
96
assert ! ( n_sources_found > 0 , "couldn't find any profiler runtime source files in {src_root:?}" ) ;
98
97
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
+
100
102
cfg. warnings ( false ) ;
101
103
cfg. compile ( "profiler-rt" ) ;
102
104
}
You can’t perform that action at this time.
0 commit comments