
* Associated types for Corpus, State * cleanup * fix no_std * drop unused clauses * Corpus * cleanup * adding things * fixed fuzzer * remove phantom data * python * progress? * more more * oof * wow it builds? * python fixes, tests * fix python fun * black fmt for python * clippy, added Nop things * fixes * fix merge * make it compile (#836) * doc-test fixes, prelude-b-gone for cargo-hack compat * fixes for windows, concolic * really fix windows, maybe * imagine using windows * ... * elide I generic when used with S: State * Elide many, many generics, but at what cost? * progress on push * Constraint HasCorpus, HasSolutions at trait definition * remove unused feature * remove unstable usage since we constrained HasCorpus at definition * compiled, but still no type inference for MaxMapFeedback * cleanup inprocess * resolve some std conflicts * simplify map * undo unnecessary cfg specification * fix breaking test case for CI on no-std * fix concolic build failures * fix macos build * fixes for windows build * timeout fixes for windows build * fix pybindings issues * fixup qemu * fix outstanding local build issues * maybe fix windows inprocess * doc fixes * unbridled fury * de-associate State from Feedback, replace with generic as AT inference is not sufficient to derive specialisation for MapFeedback * merge update * refactor + speed up fuzzer builds by sharing build work * cleanup lingering compiler errors * lol missed one * revert QEMU-Nyx change, not sure how I did that * move HasInput to inputs * HasInput => KnowsInput * update bounds to enforce via associated types * disentangle observers with fuzzer * revert --target; update some fuzzers to match new API * resolve outstanding fuzzer build blockers (that I can run on my system) * fixes for non-linux unixes * fix for windows * Knows => Uses, final fixes for windows * <guttural screaming> * fixes for concolic * loosen bound for frida executor so windows builds correctly * cleanup generics for eventmanager/eventprocessor to drop observers requirement * improve inference over fuzz_one and friends * update migration notes * fixes for python bindings * fixes for generic counts in event managers * finish migration notes * post-merge fix Co-authored-by: Addison Crump <addison.crump@cispa.de>
50 lines
1.2 KiB
Rust
50 lines
1.2 KiB
Rust
use std::{
|
|
env,
|
|
path::Path,
|
|
process::{exit, Command},
|
|
};
|
|
|
|
const AFL_URL: &str = "https://github.com/AFLplusplus/AFLplusplus";
|
|
|
|
fn main() {
|
|
if cfg!(windows) {
|
|
println!("cargo:warning=No support for windows yet.");
|
|
exit(0);
|
|
}
|
|
|
|
let cwd = env::current_dir().unwrap().to_string_lossy().to_string();
|
|
|
|
let afl = format!("{}/AFLplusplus", &cwd);
|
|
let afl_gcc = format!("{}/AFLplusplus/afl-cc", &cwd);
|
|
|
|
let afl_path = Path::new(&afl);
|
|
let afl_gcc_path = Path::new(&afl_gcc);
|
|
|
|
if !afl_path.is_dir() {
|
|
println!("cargo:warning=AFL++ not found, downloading...");
|
|
Command::new("git")
|
|
.arg("clone")
|
|
.arg(AFL_URL)
|
|
.status()
|
|
.unwrap();
|
|
}
|
|
|
|
if !afl_gcc_path.is_file() {
|
|
Command::new("make")
|
|
.arg("all")
|
|
.current_dir(afl_path)
|
|
.status()
|
|
.unwrap();
|
|
}
|
|
|
|
Command::new(afl_gcc_path)
|
|
.args(["src/program.c", "-o"])
|
|
.arg(&format!("{}/target/release/program", &cwd))
|
|
.arg("-fsanitize=address")
|
|
.status()
|
|
.unwrap();
|
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
println!("cargo:rerun-if-changed=src/");
|
|
}
|