Skip to content

Commit 725f486

Browse files
committed
Bring back make clean
1 parent 2aa211d commit 725f486

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cargo-afl/src/config.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ pub fn config(args: &Args) -> Result<()> {
9292

9393
fn build_afl(args: &Args, work_dir: &Path) -> Result<()> {
9494
// if you had already installed cargo-afl previously you **must** clean AFL++
95-
// smoelius: AFL++ is now copied to a temporary directory before being built. So `make clean`
96-
// is no longer necessary.
9795
let afl_dir = common::afl_dir()?;
9896
let mut command = Command::new("make");
9997
command
10098
.current_dir(work_dir)
101-
.arg("install")
99+
.args(["clean", "install"])
102100
// skip the checks for the legacy x86 afl-gcc compiler
103101
.env("AFL_NO_X86", "1")
104102
.env("DESTDIR", afl_dir)
@@ -120,7 +118,11 @@ fn build_afl(args: &Args, work_dir: &Path) -> Result<()> {
120118
}
121119

122120
let success = command.status().as_ref().is_ok_and(ExitStatus::success);
123-
ensure!(success, "could not run 'make install'");
121+
ensure!(
122+
success,
123+
"could not run 'make clean install' in {}",
124+
work_dir.display()
125+
);
124126

125127
Ok(())
126128
}

0 commit comments

Comments
 (0)