fix: libafl_libfuzzer build script (#2282)

- features check was inverted
- print helpful message when `llvm-nm` wasn't found, which happens to be
  the case on _stable_

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
This commit is contained in:
Marco Neumann 2024-06-07 23:37:08 +02:00 committed by GitHub
parent 477941e0e2
commit b1bec42044
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ fn main() {
features.push("libafl/introspection"); features.push("libafl/introspection");
} }
if features.is_empty() { if !features.is_empty() {
command.arg("--features").arg(features.join(",")); command.arg("--features").arg(features.join(","));
} }
@ -104,7 +104,7 @@ fn main() {
.arg(&archive_path) .arg(&archive_path)
.stdout(Stdio::piped()) .stdout(Stdio::piped())
.spawn() .spawn()
.unwrap(); .expect("llvm-nm works (are you using nightly?)");
let mut redefinitions_file = BufWriter::new(File::create(&redefined_symbols).unwrap()); let mut redefinitions_file = BufWriter::new(File::create(&redefined_symbols).unwrap());