Skip to content

Commit 737524f

Browse files
authored
Merge pull request #28 from oherrala/update-cc
Rename and update gcc crate to cc
2 parents 67f7399 + 9eaf125 commit 737524f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ members = ["."]
1515
arbitrary = "0.1"
1616

1717
[build-dependencies]
18-
gcc = "0.3"
18+
cc = "1.0"

build.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern crate gcc;
1+
extern crate cc;
22

33
fn main() {
44
if let Ok(custom) = ::std::env::var("CUSTOM_LIBFUZZER_PATH") {
@@ -13,18 +13,18 @@ fn main() {
1313
/* FIXME: this is assuming a C++ fuzzer, but should be customizable */
1414
println!("cargo:rustc-link-lib=stdc++");
1515
} else {
16-
let mut config = gcc::Config::new();
16+
let mut build = cc::Build::new();
1717
let sources = ::std::fs::read_dir("llvm/lib/Fuzzer")
1818
.expect("listable source directory")
1919
.map(|de| de.expect("file in directory").path())
2020
.filter(|p| p.extension().map(|ext| ext == "cpp") == Some(true))
2121
.collect::<Vec<_>>();
2222
for source in sources.iter() {
23-
config.file(source.to_str().unwrap());
23+
build.file(source.to_str().unwrap());
2424
}
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");
2929
}
3030
}

0 commit comments

Comments
 (0)