Skip to content

Commit d4f4734

Browse files
authored
libafl_libfuzzer: replace cargo:error with assert in build.rs (#1517)
It is very confusing if you are trying to build on MacOS and it is telling you that it worked, but actually it didn't.
1 parent acecf46 commit d4f4734

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

libafl_libfuzzer/build.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ fn main() {
44
if cfg!(any(feature = "cargo-clippy", docsrs)) {
55
return; // skip when clippy or docs is running
66
}
7-
if cfg!(not(target_os = "linux")) {
8-
println!(
9-
"cargo:error=The libafl_libfuzzer runtime may only be built for linux; failing fast."
10-
);
11-
return;
12-
}
7+
assert!(
8+
cfg!(target_os = "linux"),
9+
"The libafl_libfuzzer runtime may only be built for linux; failing fast."
10+
);
11+
1312
println!("cargo:rerun-if-changed=libafl_libfuzzer_runtime/src");
1413
println!("cargo:rerun-if-changed=libafl_libfuzzer_runtime/Cargo.toml");
1514
println!("cargo:rerun-if-changed=libafl_libfuzzer_runtime/build.rs");

0 commit comments

Comments
 (0)