diff --git a/libafl_qemu/libafl_qemu_build/src/lib.rs b/libafl_qemu/libafl_qemu_build/src/lib.rs index 5845321f3a..c5828c5fa6 100644 --- a/libafl_qemu/libafl_qemu_build/src/lib.rs +++ b/libafl_qemu/libafl_qemu_build/src/lib.rs @@ -107,11 +107,13 @@ fn find_llvm_config() -> Result { if let Some(ver) = find_llvm_version("llvm-config".to_owned()) { if ver >= rustc_llvm_ver { return Ok("llvm-config".to_owned()); + } else { + return Err(format!("Version of llvm-config is {ver} but needs to be at least rustc's version({rustc_llvm_ver})")); } } } - Err("could not find llvm-config".to_owned()) + Err("Could not find llvm-config".to_owned()) } fn exec_llvm_config(llvm_config: String, args: &[&str]) -> String { @@ -165,7 +167,7 @@ fn qemu_bindgen_clang_args( is_usermode: bool, ) -> Vec { if env::var("LLVM_CONFIG_PATH").is_err() { - let found = find_llvm_config().expect("Cannot find a suitable llvm-config, it must be a version equal or greater than the rustc LLVM version"); + let found = find_llvm_config().expect("Cannot find a suitable llvm-config, it must be a version equal or greater than the rustc LLVM version. Try specifying LLVM_CONFIG_PATH."); env::set_var("LLVM_CONFIG_PATH", found); }