cargo-binstall/crates/detect-targets
Jiahao XU 0fa315758b
feat detect-targets: Improve support of non-std glibc/musl (#1343)
* feat `detect-targets`: Improve support of non-std glibc/musl

Fixed #1329

 - Refactor: Create `linux::detect_alternative_targets` to reuse code
   from other targets
 - Run `/lib/ld-linux-{cpu_arch}.so.1 --version` for checking glibc
   support instead of running `ldd --version` since it could be non-std
   glibc installation and does not provide
   `/lib/ld-linux-{cpu_arch}.so.1`
 - Check for non-std glibc and add fallback target
   `{cpu_arch}-{distro_name}-linux-gnu{abi}`
 - Add `{cpu_arch}-{distro_name}-linux-musl{abi}` fallback for musl
   libc, specially for Alpine since it has a
   `/lib/ld-musl-{cpu_arch}.so.1`
 - For unknown libc flavor, check for the target provided before
   fallback to musl

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* feat `detect-targets`: Support glibc on musl target

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* feat `detect-targets`: Unify `Libc::{Gnu, Musl}` checks

since we can't really tell if we are on gnu or musl

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-02 23:19:34 +00:00
..
src feat detect-targets: Improve support of non-std glibc/musl (#1343) 2023-09-02 23:19:34 +00:00
build.rs Optimize compilation time (#320) 2022-08-27 23:27:39 +12:00
Cargo.toml release: detect-targets v0.1.10 (#1280) 2023-08-11 02:22:13 +00:00
LICENSE-APACHE Refactor: Extract new crate detect-targets and improve code quality (#307) 2022-08-21 22:21:33 +10:00
LICENSE-MIT Refactor: Extract new crate detect-targets and improve code quality (#307) 2022-08-21 22:21:33 +10:00