File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ members = ["."]
15
15
arbitrary = " 0.1"
16
16
17
17
[build-dependencies ]
18
- gcc = " 0.3 "
18
+ cc = " 1.0 "
Original file line number Diff line number Diff line change 1
- extern crate gcc ;
1
+ extern crate cc ;
2
2
3
3
fn main ( ) {
4
4
if let Ok ( custom) = :: std:: env:: var ( "CUSTOM_LIBFUZZER_PATH" ) {
@@ -13,18 +13,18 @@ fn main() {
13
13
/* FIXME: this is assuming a C++ fuzzer, but should be customizable */
14
14
println ! ( "cargo:rustc-link-lib=stdc++" ) ;
15
15
} else {
16
- let mut config = gcc :: Config :: new ( ) ;
16
+ let mut build = cc :: Build :: new ( ) ;
17
17
let sources = :: std:: fs:: read_dir ( "llvm/lib/Fuzzer" )
18
18
. expect ( "listable source directory" )
19
19
. map ( |de| de. expect ( "file in directory" ) . path ( ) )
20
20
. filter ( |p| p. extension ( ) . map ( |ext| ext == "cpp" ) == Some ( true ) )
21
21
. collect :: < Vec < _ > > ( ) ;
22
22
for source in sources. iter ( ) {
23
- config . file ( source. to_str ( ) . unwrap ( ) ) ;
23
+ build . file ( source. to_str ( ) . unwrap ( ) ) ;
24
24
}
25
- config . flag ( "-std=c++11" ) ;
26
- config . flag ( "-fno-omit-frame-pointer" ) ;
27
- config . cpp ( true ) ;
28
- config . compile ( "libfuzzer.a" ) ;
25
+ build . flag ( "-std=c++11" ) ;
26
+ build . flag ( "-fno-omit-frame-pointer" ) ;
27
+ build . cpp ( true ) ;
28
+ build . compile ( "libfuzzer.a" ) ;
29
29
}
30
30
}
You can’t perform that action at this time.
0 commit comments