Improve Apple support for libafl_cc dll_extensions (#892)
This commit is contained in:
parent
2011ed299b
commit
a22c76e02e
@ -16,10 +16,16 @@ const LLVM_VERSION_MIN: u32 = 6;
|
|||||||
|
|
||||||
/// Get the extension for a shared object
|
/// Get the extension for a shared object
|
||||||
fn dll_extension<'a>() -> &'a str {
|
fn dll_extension<'a>() -> &'a str {
|
||||||
match env::var("CARGO_CFG_TARGET_OS").unwrap().as_str() {
|
if let Ok(vendor) = env::var("CARGO_CFG_TARGET_VENDOR") {
|
||||||
|
if vendor == "apple" {
|
||||||
|
return "dylib";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let family = env::var("CARGO_CFG_TARGET_FAMILY").unwrap();
|
||||||
|
match family.as_str() {
|
||||||
"windows" => "dll",
|
"windows" => "dll",
|
||||||
"macos" | "ios" => "dylib",
|
"unix" => "so",
|
||||||
_ => "so",
|
_ => panic!("Unsupported target family: {family}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user