Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-06 23:17:07 +10:00
parent c9c3cffb25
commit 3f7f293b78
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -25,7 +25,7 @@ pub async fn detect_targets() -> ArrayVec<Box<str>, 2> {
#[cfg(target_os = "linux")]
if v[0].contains("gnu") {
v.push(target.replace("gnu", "musl").into_boxed_str());
v.push(v[0].replace("gnu", "musl").into_boxed_str());
}
#[cfg(target_os = "macos")]
@ -88,9 +88,9 @@ mod linux {
}) = Command::new("ldd").arg("--version").output().await
{
let libc_version =
if let Some(libc_version) = parse_libc_version_from_ldd_output(stdout) {
if let Some(libc_version) = parse_libc_version_from_ldd_output(&stdout) {
libc_version
} else if let Some(libc_version) = parse_libc_version(stderr) {
} else if let Some(libc_version) = parse_libc_version_from_ldd_output(&stderr) {
libc_version
} else {
return from_array([create_target_str("musl", abi)]);