Better error for libafl_cc when binaries are not found (#2988)
* better error when libafl_cc does not work as expected * better msg, clippy
This commit is contained in:
parent
d382b8381e
commit
530a3cc6aa
@ -333,20 +333,25 @@ pub const LIBAFL_CC_LLVM_VERSION: Option<usize> = None;
|
||||
llvm_ar = Path::new(&llvm_ar_path).join("llvm-ar");
|
||||
}
|
||||
|
||||
let mut found = true;
|
||||
|
||||
if !clang.exists() {
|
||||
println!("cargo:warning=Failed to find clang frontend.");
|
||||
return;
|
||||
println!("cargo:warning=Failed to find binary: clang.");
|
||||
found = false;
|
||||
}
|
||||
|
||||
if !clangcpp.exists() {
|
||||
println!("cargo:warning=Failed to find clang++ frontend.");
|
||||
return;
|
||||
println!("cargo:warning=Failed to find binary: clang++.");
|
||||
found = false;
|
||||
}
|
||||
|
||||
if !llvm_ar.exists() {
|
||||
println!("cargo:warning=Failed to find llvm-ar archiver.");
|
||||
return;
|
||||
println!("cargo:warning=Failed to find binary: llvm-ar.");
|
||||
found = false;
|
||||
}
|
||||
|
||||
assert!(found, "\n\tAt least one of the LLVM dependencies could not be found.\n\tThe following search directory was considered: {}\n", bindir_path.display());
|
||||
|
||||
let cxxflags = if let Ok(flags) = llvm_cxxflags {
|
||||
flags
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user