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"
9
9
path = " lib.rs"
10
10
11
11
[build-dependencies ]
12
+ build_helper = { path = " ../build_helper" }
12
13
cmake = " 0.1.18"
13
14
14
15
[dependencies ]
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ extern crate build_helper;
11
12
extern crate cmake;
12
13
13
14
use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
29
30
dst. join( "build/lib/linux" ) . display( ) ) ;
30
31
println ! ( "cargo:rustc-link-lib=static=clang_rt.asan-x86_64" ) ;
31
32
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" ) ) ;
47
36
}
48
37
49
38
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_lsan"
9
9
path = " lib.rs"
10
10
11
11
[build-dependencies ]
12
+ build_helper = { path = " ../build_helper" }
12
13
cmake = " 0.1.18"
13
14
14
15
[dependencies ]
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ extern crate build_helper;
11
12
extern crate cmake;
12
13
13
14
use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
29
30
dst. join( "build/lib/linux" ) . display( ) ) ;
30
31
println ! ( "cargo:rustc-link-lib=static=clang_rt.lsan-x86_64" ) ;
31
32
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" ) ) ;
47
36
}
48
37
49
38
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_msan"
9
9
path = " lib.rs"
10
10
11
11
[build-dependencies ]
12
+ build_helper = { path = " ../build_helper" }
12
13
cmake = " 0.1.18"
13
14
14
15
[dependencies ]
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ extern crate build_helper;
11
12
extern crate cmake;
12
13
13
14
use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
29
30
dst. join( "build/lib/linux" ) . display( ) ) ;
30
31
println ! ( "cargo:rustc-link-lib=static=clang_rt.msan-x86_64" ) ;
31
32
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" ) ) ;
47
36
}
48
37
49
38
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ name = "rustc_tsan"
9
9
path = " lib.rs"
10
10
11
11
[build-dependencies ]
12
+ build_helper = { path = " ../build_helper" }
12
13
cmake = " 0.1.18"
13
14
14
15
[dependencies ]
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ extern crate build_helper;
11
12
extern crate cmake;
12
13
13
14
use std:: path:: PathBuf ;
@@ -29,21 +30,9 @@ fn main() {
29
30
dst. join( "build/lib/linux" ) . display( ) ) ;
30
31
println ! ( "cargo:rustc-link-lib=static=clang_rt.tsan-x86_64" ) ;
31
32
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" ) ) ;
47
36
}
48
37
49
38
println ! ( "cargo:rerun-if-changed=build.rs" ) ;
You can’t perform that action at this time.
0 commit comments