mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Fix parse_abi
for gnu_ilp32
and gnuspe
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
1df135f4c0
commit
11fe943a11
1 changed files with 7 additions and 9 deletions
|
@ -120,16 +120,14 @@ mod linux {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_abi() -> &'static str {
|
fn parse_abi() -> &'static str {
|
||||||
if TARGET.ends_with("abi64") {
|
let last = TARGET.rsplit_once('-').unwrap().1;
|
||||||
"abi64"
|
|
||||||
} else if TARGET.ends_with("eabi") {
|
if let Some(libc_version) = last.strip_prefix("musl") {
|
||||||
"eabi"
|
libc_version
|
||||||
} else if TARGET.ends_with("eabihf") {
|
} else if let Some(libc_version) = last.strip_prefix("gnu") {
|
||||||
"eabihf"
|
libc_version
|
||||||
} else if TARGET.ends_with("gnu") || TARGET.ends_with("musl") {
|
|
||||||
""
|
|
||||||
} else {
|
} else {
|
||||||
panic!("Unknown abi")
|
panic!("Unrecognized libc")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue