cargo-binstall/crates/detect-targets/src
Jiahao XU d72abde8e9
Fixed #704: Fix get_target_from_rustc for alpine (#705)
On Alpine, rustc returns host triple `x86_64-alpine-linux-musl`, so we
have to adopt code from
[`convert_custom_linux_target`](5519aeb5c2/build-common.rs (L1-L13)) to fix this.

* Optimize `get_target_from_rustc`: Avoid frequent String allocation

caused by `Cursor::new(stdout).lines()` which calls `BufRead::lines` and
returns `Lines` iterator, which returns `Item = io::Result<String>`.

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

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-01-16 10:57:53 +11:00
..
detect Fix detect_targets_linux: Detect arch/libc at runtime using guess_host_triple (#649) 2023-01-04 14:32:13 +13:00
desired_targets.rs Fix doc of desired_targets (#337) 2022-09-04 15:11:28 +00:00
detect.rs Fixed #704: Fix get_target_from_rustc for alpine (#705) 2023-01-16 10:57:53 +11:00
lib.rs Use CARGO env variable if present (#453) 2022-10-02 04:52:25 +13:00