File tree Expand file tree Collapse file tree 9 files changed +24
-60
lines changed Expand file tree Collapse file tree 9 files changed +24
-60
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_asan"
99path = " lib.rs"
1010
1111[build-dependencies ]
12+ build_helper = { path = " ../build_helper" }
1213cmake = " 0.1.18"
1314
1415[dependencies ]
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11+ extern crate build_helper;
1112extern crate cmake;
1213
1314use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
2930 dst. join( "build/lib/linux" ) . display( ) ) ;
3031 println ! ( "cargo:rustc-link-lib=static=clang_rt.asan-x86_64" ) ;
3132
32- let src_dir = PathBuf :: from ( env:: var_os ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
33- let mut stack = src_dir. join ( "../compiler-rt" )
34- . read_dir ( )
35- . unwrap ( )
36- . map ( |e| e. unwrap ( ) )
37- . filter ( |e| & * e. file_name ( ) != ".git" )
38- . collect :: < Vec < _ > > ( ) ;
39- while let Some ( entry) = stack. pop ( ) {
40- let path = entry. path ( ) ;
41- if entry. file_type ( ) . unwrap ( ) . is_dir ( ) {
42- stack. extend ( path. read_dir ( ) . unwrap ( ) . map ( |e| e. unwrap ( ) ) ) ;
43- } else {
44- println ! ( "cargo:rerun-if-changed={}" , path. display( ) ) ;
45- }
46- }
33+ build_helper:: rerun_if_changed_anything_in_dir ( & PathBuf :: from ( env:: var ( "CARGO_MANIFEST_DIR" )
34+ . unwrap ( ) )
35+ . join ( "../compiler-rt" ) ) ;
4736 }
4837
4938 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_lsan"
99path = " lib.rs"
1010
1111[build-dependencies ]
12+ build_helper = { path = " ../build_helper" }
1213cmake = " 0.1.18"
1314
1415[dependencies ]
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11+ extern crate build_helper;
1112extern crate cmake;
1213
1314use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
2930 dst. join( "build/lib/linux" ) . display( ) ) ;
3031 println ! ( "cargo:rustc-link-lib=static=clang_rt.lsan-x86_64" ) ;
3132
32- let src_dir = PathBuf :: from ( env:: var_os ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
33- let mut stack = src_dir. join ( "../compiler-rt" )
34- . read_dir ( )
35- . unwrap ( )
36- . map ( |e| e. unwrap ( ) )
37- . filter ( |e| & * e. file_name ( ) != ".git" )
38- . collect :: < Vec < _ > > ( ) ;
39- while let Some ( entry) = stack. pop ( ) {
40- let path = entry. path ( ) ;
41- if entry. file_type ( ) . unwrap ( ) . is_dir ( ) {
42- stack. extend ( path. read_dir ( ) . unwrap ( ) . map ( |e| e. unwrap ( ) ) ) ;
43- } else {
44- println ! ( "cargo:rerun-if-changed={}" , path. display( ) ) ;
45- }
46- }
33+ build_helper:: rerun_if_changed_anything_in_dir ( & PathBuf :: from ( env:: var ( "CARGO_MANIFEST_DIR" )
34+ . unwrap ( ) )
35+ . join ( "../compiler-rt" ) ) ;
4736 }
4837
4938 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_msan"
99path = " lib.rs"
1010
1111[build-dependencies ]
12+ build_helper = { path = " ../build_helper" }
1213cmake = " 0.1.18"
1314
1415[dependencies ]
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11+ extern crate build_helper;
1112extern crate cmake;
1213
1314use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
2930 dst. join( "build/lib/linux" ) . display( ) ) ;
3031 println ! ( "cargo:rustc-link-lib=static=clang_rt.msan-x86_64" ) ;
3132
32- let src_dir = PathBuf :: from ( env:: var_os ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
33- let mut stack = src_dir. join ( "../compiler-rt" )
34- . read_dir ( )
35- . unwrap ( )
36- . map ( |e| e. unwrap ( ) )
37- . filter ( |e| & * e. file_name ( ) != ".git" )
38- . collect :: < Vec < _ > > ( ) ;
39- while let Some ( entry) = stack. pop ( ) {
40- let path = entry. path ( ) ;
41- if entry. file_type ( ) . unwrap ( ) . is_dir ( ) {
42- stack. extend ( path. read_dir ( ) . unwrap ( ) . map ( |e| e. unwrap ( ) ) ) ;
43- } else {
44- println ! ( "cargo:rerun-if-changed={}" , path. display( ) ) ;
45- }
46- }
33+ build_helper:: rerun_if_changed_anything_in_dir ( & PathBuf :: from ( env:: var ( "CARGO_MANIFEST_DIR" )
34+ . unwrap ( ) )
35+ . join ( "../compiler-rt" ) ) ;
4736 }
4837
4938 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_tsan"
99path = " lib.rs"
1010
1111[build-dependencies ]
12+ build_helper = { path = " ../build_helper" }
1213cmake = " 0.1.18"
1314
1415[dependencies ]
Original file line number Diff line number Diff line change 88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11+ extern crate build_helper;
1112extern crate cmake;
1213
1314use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
2930 dst. join( "build/lib/linux" ) . display( ) ) ;
3031 println ! ( "cargo:rustc-link-lib=static=clang_rt.tsan-x86_64" ) ;
3132
32- let src_dir = PathBuf :: from ( env:: var_os ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
33- let mut stack = src_dir. join ( "../compiler-rt" )
34- . read_dir ( )
35- . unwrap ( )
36- . map ( |e| e. unwrap ( ) )
37- . filter ( |e| & * e. file_name ( ) != ".git" )
38- . collect :: < Vec < _ > > ( ) ;
39- while let Some ( entry) = stack. pop ( ) {
40- let path = entry. path ( ) ;
41- if entry. file_type ( ) . unwrap ( ) . is_dir ( ) {
42- stack. extend ( path. read_dir ( ) . unwrap ( ) . map ( |e| e. unwrap ( ) ) ) ;
43- } else {
44- println ! ( "cargo:rerun-if-changed={}" , path. display( ) ) ;
45- }
46- }
33+ build_helper:: rerun_if_changed_anything_in_dir ( & PathBuf :: from ( env:: var ( "CARGO_MANIFEST_DIR" )
34+ . unwrap ( ) )
35+ . join ( "../compiler-rt" ) ) ;
4736 }
4837
4938 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
You can’t perform that action at this time.
0 commit comments