Skip to content

Commit

Permalink
build.rs: Remove DEBUG environment variable
Browse files Browse the repository at this point in the history
The DEBUG variable is only removed it set to `false` by cargo. When
called with DEBUG set, AFLplusplus will set -Werror in CFLAGS and
sometimes fail to build spuriously.
  • Loading branch information
vkleen committed Aug 30, 2022
1 parent 5190290 commit 3724052
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ fn build_afl(out_dir: &Path) {
.env("NO_BUILD", "1")
.env("DESTDIR", out_dir)
.env("PREFIX", "");
if std::env::var("DEBUG").as_deref() == Ok("false") {
command.env_remove("DEBUG");
}
let status = command.status().expect("could not run 'make'");
assert!(status.success());
}
Expand Down

0 comments on commit 3724052

Please sign in to comment.